diff options
-rw-r--r-- | drivers/regulator/lp8755.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/regulator/lp8755.c b/drivers/regulator/lp8755.c index dbc4d1254ca1..06a82e2cbf4b 100644 --- a/drivers/regulator/lp8755.c +++ b/drivers/regulator/lp8755.c | |||
@@ -358,7 +358,9 @@ static int lp8755_regulator_init(struct lp8755_chip *pchip) | |||
358 | regulator_register(&lp8755_regulators[buck_num], &rconfig); | 358 | regulator_register(&lp8755_regulators[buck_num], &rconfig); |
359 | if (IS_ERR(pchip->rdev[buck_num])) { | 359 | if (IS_ERR(pchip->rdev[buck_num])) { |
360 | ret = PTR_ERR(pchip->rdev[buck_num]); | 360 | ret = PTR_ERR(pchip->rdev[buck_num]); |
361 | dev_err(pchip->dev, "regulator init failed: buck 0\n"); | 361 | pchip->rdev[buck_num] = NULL; |
362 | dev_err(pchip->dev, "regulator init failed: buck %d\n", | ||
363 | buck_num); | ||
362 | goto err_buck; | 364 | goto err_buck; |
363 | } | 365 | } |
364 | } | 366 | } |
@@ -367,8 +369,7 @@ static int lp8755_regulator_init(struct lp8755_chip *pchip) | |||
367 | 369 | ||
368 | err_buck: | 370 | err_buck: |
369 | for (icnt = 0; icnt < LP8755_BUCK_MAX; icnt++) | 371 | for (icnt = 0; icnt < LP8755_BUCK_MAX; icnt++) |
370 | if (pchip->rdev[icnt] != NULL) | 372 | regulator_unregister(pchip->rdev[icnt]); |
371 | regulator_unregister(pchip->rdev[icnt]); | ||
372 | return ret; | 373 | return ret; |
373 | } | 374 | } |
374 | 375 | ||
@@ -557,7 +558,7 @@ static struct i2c_driver lp8755_i2c_driver = { | |||
557 | .name = LP8755_NAME, | 558 | .name = LP8755_NAME, |
558 | }, | 559 | }, |
559 | .probe = lp8755_probe, | 560 | .probe = lp8755_probe, |
560 | .remove = __devexit_p(lp8755_remove), | 561 | .remove = lp8755_remove, |
561 | .id_table = lp8755_id, | 562 | .id_table = lp8755_id, |
562 | }; | 563 | }; |
563 | 564 | ||