Explorar o código

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 <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>
Axel Lin %!s(int64=15) %!d(string=hai) anos
pai
achega
d3622e6f05
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      drivers/input/touchscreen/wm97xx-core.c

+ 1 - 2
drivers/input/touchscreen/wm97xx-core.c

@@ -684,8 +684,7 @@ static int wm97xx_probe(struct device *dev)
  touch_reg_err:
  touch_reg_err:
 	platform_device_put(wm->touch_dev);
 	platform_device_put(wm->touch_dev);
  touch_err:
  touch_err:
-	platform_device_unregister(wm->battery_dev);
-	wm->battery_dev = NULL;
+	platform_device_del(wm->battery_dev);
  batt_reg_err:
  batt_reg_err:
 	platform_device_put(wm->battery_dev);
 	platform_device_put(wm->battery_dev);
  batt_err:
  batt_err: