From: Axel Lin Date: Fri, 3 Sep 2010 17:31:04 +0000 (-0700) Subject: Input: wm97xx-core - simplify error path in wm97xx_probe() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d3622e6f05b2134deb5ba8ca2f6bcce5391e7e6d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Input: wm97xx-core - simplify error path in wm97xx_probe() Use platform_device_del() instead of platform_device_unregister() in error handling path. Signed-off-by: Axel Lin Acked-by: Liam Girdwood Acked-by: Mark Brown Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c index cbfef1ea7e30..770537c14628 100644 --- a/drivers/input/touchscreen/wm97xx-core.c +++ b/drivers/input/touchscreen/wm97xx-core.c @@ -684,8 +684,7 @@ static int wm97xx_probe(struct device *dev) touch_reg_err: platform_device_put(wm->touch_dev); touch_err: - platform_device_unregister(wm->battery_dev); - wm->battery_dev = NULL; + platform_device_del(wm->battery_dev); batt_reg_err: platform_device_put(wm->battery_dev); batt_err: