aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAxel Lin <[email protected]>2010-09-03 10:31:04 -0700
committerDmitry Torokhov <[email protected]>2010-09-05 12:12:57 -0700
commitd3622e6f05b2134deb5ba8ca2f6bcce5391e7e6d (patch)
tree2155e3ed454c2d8baa7d128eb3da72345dcb17b2
parentcdd194779b72fe6d5e1b5b67ef57a0fddbd60eac (diff)
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 <[email protected]> Acked-by: Liam Girdwood <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
-rw-r--r--drivers/input/touchscreen/wm97xx-core.c3
1 files changed, 1 insertions, 2 deletions
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: