Input: wm97xx-core - simplify error path in wm97xx_probe()
authorAxel Lin <axel.lin@gmail.com>
Fri, 3 Sep 2010 17:31:04 +0000 (10:31 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 5 Sep 2010 19:12:57 +0000 (12:12 -0700)
Use platform_device_del() instead of platform_device_unregister() in error
handling path.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Acked-by: Mark Brown <broonie@opensoruce.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/touchscreen/wm97xx-core.c

index cbfef1ea7e30b55945c82314a9da5bf9a42a2457..770537c14628273347e0d73c74c0fea38b50b222 100644 (file)
@@ -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: