]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/rtc/rtc-r9701.c: fix crash in r9701_remove()
authorAnatolij Gustschin <agust@denx.de>
Mon, 5 Mar 2012 22:59:16 +0000 (14:59 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 5 Mar 2012 23:49:43 +0000 (15:49 -0800)
commit6c2b4ab6d351ba2e3ad05743aac98d47b71ea8ec
tree6f8bbc31654c7d3ee8551743e84a85a5d540dd5c
parentff8dc12c679a7be4396d1d73d575d8616e889928
drivers/rtc/rtc-r9701.c: fix crash in r9701_remove()

If probing the RTC didn't succeed due to failed RTC register access, the
RTC device will be unregistered.  Then, when removing the module
r9701_remove() causes a kernel crash while trying to unregister a not
registered RTC device.  Fix this by doing RTC register access test before
RTC device registration.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/rtc-r9701.c