power: supply: ab8500: add missing destroy_workqueue in ab8500_charger_bind

ab8500_charger_bind misses destroy_workqueue in error path,
this patch fixes that.

Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
Zheng Bin 2022-05-12 17:38:44 +08:00 committed by Sebastian Reichel
parent a1124c84d4
commit 38d45444e2

View file

@ -3351,6 +3351,7 @@ static int ab8500_charger_bind(struct device *dev)
ret = component_bind_all(dev, di);
if (ret) {
dev_err(dev, "can't bind component devices\n");
destroy_workqueue(di->charger_wq);
return ret;
}