aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/palmas-regulator.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-09-05 11:31:25 +0800
committerMark Brown <broonie@linaro.org>2013-09-17 00:28:44 +0100
commitcb2e45e31615bc37b31b44fc257042a860ce82b8 (patch)
treeada1f8fe328e42d672cf3b4bc6da25d424a23eb4 /drivers/regulator/palmas-regulator.c
parentregulator: Remove redundant NULL assignment (diff)
downloadlinux-dev-cb2e45e31615bc37b31b44fc257042a860ce82b8.tar.xz
linux-dev-cb2e45e31615bc37b31b44fc257042a860ce82b8.zip
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 <axel.lin@ingics.com> Acked-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator/palmas-regulator.c')
-rw-r--r--drivers/regulator/palmas-regulator.c4
1 files changed, 1 insertions, 3 deletions
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;
- }
}
}
}