提交 d3622e6f 编写于 作者: A Axel Lin 提交者: Dmitry Torokhov

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: NAxel Lin <axel.lin@gmail.com>
Acked-by: NLiam Girdwood <lrg@slimlogic.co.uk>
Acked-by: NMark Brown <broonie@opensoruce.wolfsonmicro.com>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 cdd19477
...@@ -684,8 +684,7 @@ static int wm97xx_probe(struct device *dev) ...@@ -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); platform_device_del(wm->battery_dev);
wm->battery_dev = NULL;
batt_reg_err: batt_reg_err:
platform_device_put(wm->battery_dev); platform_device_put(wm->battery_dev);
batt_err: batt_err:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册