]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drivers/rtc/rtc-test.c: avoid calling platform_device_put() twice
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Fri, 9 Nov 2012 03:04:58 +0000 (14:04 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 12 Nov 2012 04:17:26 +0000 (15:17 +1100)
commiteddc0862a4d26c404b8df8441cee94d95cc9d320
treeaa3ce7d26b5c3f4dcf6198fe019e329db92cc2ae
parent02d4f147067b2376dee1fe3d311ddb82d2501a5f
drivers/rtc/rtc-test.c: avoid calling platform_device_put() twice

In case of error, test_init() needs to call platform_device_del() instead
of platform_device_unregister().  Otherwise, we may call
platform_device_put() twice.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/rtc/rtc-test.c