Skip to contentSkip to conversation

Input: wm97xx-core - use platform_device_del instead of platform_device_unregister for error handling

PATCH Applied Axel Lin 4 participants 4 messages Sep 2, 2010

Subsystems (3)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 Input: wm97xx-core - use platform_device_del instead of platform_device_unregister for error handling

---
 drivers/input/touchscreen/wm97xx-core.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/input/touchscreen/wm97xx-core.c +1 -2
index cbfef1e..770537c 100644
@@ -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:
Signature · 1 line
1.7.2
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Axel Lin
---
 drivers/input/touchscreen/wm97xx-core.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/input/touchscreen/wm97xx-core.c +0 -0
index cbfef1e..770537c 100644

drivers/input/touchscreen/wm97xx-core.c static int wm97xx_probe(struct device *dev) · line 690

Quoted 9 lines
drivers/input/touchscreen/wm97xx-core.c +1 -2
@@ -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:
Signature · 3 lines
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk