diff --git a/drivers/base/platform.c b/drivers/base/platform.c index bcb6519fe2113..0ee3cab88f70f 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -702,6 +702,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