aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-09-04 23:31:25 -0400
committerMark Brown <broonie@linaro.org>2013-09-16 19:28:44 -0400
commitcb2e45e31615bc37b31b44fc257042a860ce82b8 (patch)
treeada1f8fe328e42d672cf3b4bc6da25d424a23eb4
parentcab87f062d0c57c9734257e4079ced489a3189b1 (diff)
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.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)
1037 else 1037 else
1038 ret = palmas_extreg_init(palmas, 1038 ret = palmas_extreg_init(palmas,
1039 id, reg_init); 1039 id, reg_init);
1040 if (ret) { 1040 if (ret)
1041 regulator_unregister(pmic->rdev[id]);
1042 return ret; 1041 return ret;
1043 }
1044 } 1042 }
1045 } 1043 }
1046 } 1044 }