On 04/11/2013 06:05 AM, Axel Lin wrote:
Signed-off-by: Axel Lin <[email protected]>
Looks good to me.

Acked-by: Bengt Jonsson <[email protected]>
---
  drivers/regulator/ab8500.c |    5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index c200f8b..ea182d3 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -3172,8 +3172,11 @@ static int ab8500_regulator_probe(struct platform_device 
*pdev)
        for (i = 0; i < abx500_regulator.info_size; i++) {
                err = ab8500_regulator_register(pdev, &pdata->regulator[i],
                                                i, NULL);
-               if (err < 0)
+               if (err < 0) {
+                       if (!is_ab8505(ab8500))
+                               ab8500_ext_regulator_exit(pdev);
                        return err;
+               }
        }
return 0;

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to