diff --git a/drivers/base/platform.c b/drivers/base/platform.c index b27d0f6c18c9c0..f5d485166fd3fb 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -851,6 +851,8 @@ int __init_or_module __platform_driver_probe(struct platform_driver *drv, /* temporary section violation during probe() */ drv->probe = probe; retval = code = __platform_driver_register(drv, module); + if (retval) + return retval; /* * Fixup that section violation, being paranoid about code scanning