The patch titled
     driver core fixes: device_register() retval check in platform.c
has been added to the -mm tree.  Its filename is
     driver-core-fixes-device_register-retval-check-in.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: driver core fixes: device_register() retval check in platform.c
From: Cornelia Huck <[EMAIL PROTECTED]>

Check the return value of device_register() in platform_bus_init().

Signed-off-by: Cornelia Huck <[EMAIL PROTECTED]>
Cc: Greg KH <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---

 drivers/base/platform.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff -puN 
drivers/base/platform.c~driver-core-fixes-device_register-retval-check-in 
drivers/base/platform.c
--- a/drivers/base/platform.c~driver-core-fixes-device_register-retval-check-in
+++ a/drivers/base/platform.c
@@ -611,8 +611,15 @@ EXPORT_SYMBOL_GPL(platform_bus_type);
 
 int __init platform_bus_init(void)
 {
-       device_register(&platform_bus);
-       return bus_register(&platform_bus_type);
+       int error;
+
+       error = device_register(&platform_bus);
+       if (error)
+               return error;
+       error =  bus_register(&platform_bus_type);
+       if (error)
+               device_unregister(&platform_bus);
+       return error;
 }
 
 #ifndef ARCH_HAS_DMA_GET_REQUIRED_MASK
_

Patches currently in -mm which might be from [EMAIL PROTECTED] are

driver-core-introduce-device_move-move-a-device.patch
driver-core-use-klist_remove-in-device_move.patch
driver-core-fixes-make_class_name-retval-checks.patch
driver-core-fixes-sysfs_create_link-retval-checks-in.patch
driver-core-fixes-device_register-retval-check-in.patch
driver-core-dont-stop-probing-on-probe-errors.patch
driver-core-change-function-call-order-in.patch
driver-core-per-subsystem-multithreaded-probing.patch
driver-core-dont-fail-attaching-the-device-if-it.patch
git-s390.patch
s390-preparatory-cleanup-in-common-i-o-layer.patch
s390-make-the-per-subchannel-lock-dynamic.patch
s390-dynamic-subchannel-mapping-of-ccw-devices.patch
tty-switch-to-ktermios-sclp-fix.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to