diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-09-05 11:31:25 +0800 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-17 00:28:44 +0100 |
commit | cb2e45e31615bc37b31b44fc257042a860ce82b8 (patch) | |
tree | ada1f8fe328e42d672cf3b4bc6da25d424a23eb4 | |
parent | cab87f062d0c57c9734257e4079ced489a3189b1 (diff) | |
download | linux-cb2e45e31615bc37b31b44fc257042a860ce82b8.tar.bz2 |
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>
-rw-r--r-- | drivers/regulator/palmas-regulator.c | 4 |
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; - } } } } |