fix rtc_cmos bug
fix Bug 13326 - Null pointer dereference in rtc-cmos driver
http://bugzilla.kernel.org/show_bug.cgi?id=13326
drivers/rtc/rtc-cmos.c +3 -1
@@ -1179,7 +1179,9 @@ static int __init cmos_init(void)int retval =0 ;#ifdef CONFIG_PNP -pnp_register_driver (&cmos_pnp_driver); + retval =pnp_register_driver (&cmos_pnp_driver); +if (retval) +return retval;#endif if (!cmos_rtc.dev)
my fix is wrong?
Why no one ack this patch?
Thanks
Janboe
2009/5/17 ye janboe <[email protected]>:
Quoted 21 lines
fix Bug 13326 - Null pointer dereference in rtc-cmos driver
http://bugzilla.kernel.org/show_bug.cgi?id=13326Signed-off-by janboe <[email protected]>drivers/rtc/rtc-cmos.c +3
-1@@ -1179,7 +1179,9 @@ static int __init cmos_init(void) int retval = 0; #ifdef CONFIG_PNP - pnp_register_driver(&cmos_pnp_driver); + retval = pnp_register_driver(&cmos_pnp_driver); + if (retval) + return retval; #endif if (!cmos_rtc.dev)
ye janboe wrote On 20-05-2009 08:17:
Quoted 9 lines
my fix is wrong?
Why no one ack this patch?
Thanks
Janboe
AFAIK any fix in a driver which causes this oops is a partial fix because the case should be handled in driver core. This is what the patch suggested does actually:
So if register failed, unregister is requested to invoked, right?
Anyway, thank you for your answer.
2009/5/20 Ozan Çağlayan <[email protected]>:
Quoted 19 lines
ye janboe wrote On 20-05-2009 08:17:
Quoted 9 lines
my fix is wrong?
Why no one ack this patch?
Thanks
Janboe
AFAIK any fix in a driver which causes this oops is a partial fix because the case should be handled in driver core. This is what the patch suggested does actually: