[PATCH] drivers/rtc/rtc-rs5c372.c: fix a NULL dereference
authorAdrian Bunk <[email protected]>
Sat, 25 Nov 2006 19:09:29 +0000 (11:09 -0800)
committerLinus Torvalds <[email protected]>
Sat, 25 Nov 2006 21:28:33 +0000 (13:28 -0800)
commit17ad78e59a0334d64c3a37f964b15ab9918313c7
treecd437a4c78569352cbc03a53cc5bcde40859d18a
parentd728b1e69fd5829ec2ab2434381e5a268d4f684a
[PATCH] drivers/rtc/rtc-rs5c372.c: fix a NULL dereference

The correct order is: NULL check before dereference

This was a guaranteed NULL dereference with debugging enabled since
rs5c372_sysfs_show_osc() does actually pass NULL...

Spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <[email protected]>
Acked-by: Alessandro Zummo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/rtc/rtc-rs5c372.c