Commit d3622e6f authored by Axel Lin's avatar Axel Lin Committed by 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: default avatarAxel Lin <axel.lin@gmail.com>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
Acked-by: default avatarMark Brown <broonie@opensoruce.wolfsonmicro.com>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent cdd19477
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment