From: Anatolij Gustschin Date: Mon, 5 Mar 2012 22:59:16 +0000 (-0800) Subject: drivers/rtc/rtc-r9701.c: fix crash in r9701_remove() X-Git-Tag: v3.3-rc7~37^2~8 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73737b878767ef441d7cc34ebeeba01dd0a68dd6;p=pandora-kernel.git 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 Cc: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed