From cb2e45e31615bc37b31b44fc257042a860ce82b8 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Thu, 5 Sep 2013 11:31:25 +0800 Subject: regulator: palmas: Drop regulator_unregister while using devm_regulator_register Commmit af40a94aba "regulator: palmas: Use devm_regulator_register" missed removing a regulator_unregister() call if palmas_extreg_init falis. Fix it. Signed-off-by: Axel Lin Acked-by: Sachin Kamat Signed-off-by: Mark Brown --- drivers/regulator/palmas-regulator.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/regulator/palmas-regulator.c') diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c index 6c9670ff6be5..b5278ac4e6bd 100644 --- a/drivers/regulator/palmas-regulator.c +++ b/drivers/regulator/palmas-regulator.c @@ -1037,10 +1037,8 @@ static int palmas_regulators_probe(struct platform_device *pdev) else ret = palmas_extreg_init(palmas, id, reg_init); - if (ret) { - regulator_unregister(pmic->rdev[id]); + if (ret) return ret; - } } } } -- cgit v1.2.1