aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-04-11 00:05:43 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-04-11 12:43:56 -0400
commit42e8c811bab682121cb57d58e9a37d8cb38e51ca (patch)
tree2bcbf9bcc82ade1dd3efe340347105d6fef3348e
parent3480c0cab6e1a25fdeb63147b0b643b7825a36fb (diff)
regulator: ab8500: Unregister ab8500-ext regulators in probe() failure path
Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--drivers/regulator/ab8500.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index c200f8bb61db..ea182d3c23e6 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -3172,8 +3172,11 @@ static int ab8500_regulator_probe(struct platform_device *pdev)
3172 for (i = 0; i < abx500_regulator.info_size; i++) { 3172 for (i = 0; i < abx500_regulator.info_size; i++) {
3173 err = ab8500_regulator_register(pdev, &pdata->regulator[i], 3173 err = ab8500_regulator_register(pdev, &pdata->regulator[i],
3174 i, NULL); 3174 i, NULL);
3175 if (err < 0) 3175 if (err < 0) {
3176 if (!is_ab8505(ab8500))
3177 ab8500_ext_regulator_exit(pdev);
3176 return err; 3178 return err;
3179 }
3177 } 3180 }
3178 3181
3179 return 0; 3182 return 0;