The patch titled drivers/rtc/class.c: fix device_register() error handling has been added to the -mm tree. Its filename is drivers-rtc-classc-fix-device_register-error-handling.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: drivers/rtc/class.c: fix device_register() error handling From: Vasiliy Kulikov <segooon@xxxxxxxxx> If device_register() fails then call put_device(). See comment to device_register. Signed-off-by: Vasiliy Kulikov <segooon@xxxxxxxxx> Cc: Alessandro Zummo <a.zummo@xxxxxxxxxxxx> Cc: Wan ZongShun <mcuos.com@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/rtc/class.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff -puN drivers/rtc/class.c~drivers-rtc-classc-fix-device_register-error-handling drivers/rtc/class.c --- a/drivers/rtc/class.c~drivers-rtc-classc-fix-device_register-error-handling +++ a/drivers/rtc/class.c @@ -158,8 +158,10 @@ struct rtc_device *rtc_device_register(c rtc_dev_prepare(rtc); err = device_register(&rtc->dev); - if (err) + if (err) { + put_device(&rtc->dev); goto exit_kfree; + } rtc_dev_add_device(rtc); rtc_sysfs_add_device(rtc); _ Patches currently in -mm which might be from segooon@xxxxxxxxx are linux-next.patch md-check-return-code-of-read_sb_page.patch mm-mempolicy-check-return-code-of-check_range.patch drivers-rtc-classc-fix-device_register-error-handling.patch memstick-core-fix-device_register-error-handling.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html