diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-01-12 01:58:35 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-01-17 02:13:19 -0500 |
commit | 240a529108a11d235328a140fe6b03cf76cef099 (patch) | |
tree | 9fc0d546173b4f8199dc2d0bfba8000300d41aba /drivers/regulator/lp8755.c | |
parent | cad877ef0af8d18aae88bb7d0f30f747f003fd0f (diff) |
regulator: lp8755: Don't show unrelated messags in lp8755_probe error paths
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/lp8755.c')
-rw-r--r-- | drivers/regulator/lp8755.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/regulator/lp8755.c b/drivers/regulator/lp8755.c index decb3adbf04a..8c3f3f2094c6 100644 --- a/drivers/regulator/lp8755.c +++ b/drivers/regulator/lp8755.c | |||
@@ -497,35 +497,36 @@ static int lp8755_probe(struct i2c_client *client, | |||
497 | if (!pchip->pdata) | 497 | if (!pchip->pdata) |
498 | return -ENOMEM; | 498 | return -ENOMEM; |
499 | ret = lp8755_init_data(pchip); | 499 | ret = lp8755_init_data(pchip); |
500 | if (ret < 0) | 500 | if (ret < 0) { |
501 | goto err_chip_init; | 501 | dev_err(&client->dev, "fail to initialize chip\n"); |
502 | return ret; | ||
503 | } | ||
502 | } | 504 | } |
503 | 505 | ||
504 | ret = lp8755_regulator_init(pchip); | 506 | ret = lp8755_regulator_init(pchip); |
505 | if (ret < 0) | 507 | if (ret < 0) { |
508 | dev_err(&client->dev, "fail to initialize regulators\n"); | ||
506 | goto err_regulator; | 509 | goto err_regulator; |
510 | } | ||
507 | 511 | ||
508 | pchip->irq = client->irq; | 512 | pchip->irq = client->irq; |
509 | ret = lp8755_int_config(pchip); | 513 | ret = lp8755_int_config(pchip); |
510 | if (ret < 0) | 514 | if (ret < 0) { |
515 | dev_err(&client->dev, "fail to irq config\n"); | ||
511 | goto err_irq; | 516 | goto err_irq; |
517 | } | ||
512 | 518 | ||
513 | return ret; | 519 | return ret; |
514 | 520 | ||
515 | err_irq: | 521 | err_irq: |
516 | dev_err(&client->dev, "fail to irq config\n"); | ||
517 | |||
518 | for (icnt = 0; icnt < mphase_buck[pchip->mphase].nreg; icnt++) | 522 | for (icnt = 0; icnt < mphase_buck[pchip->mphase].nreg; icnt++) |
519 | regulator_unregister(pchip->rdev[icnt]); | 523 | regulator_unregister(pchip->rdev[icnt]); |
520 | 524 | ||
521 | err_regulator: | 525 | err_regulator: |
522 | dev_err(&client->dev, "fail to initialize regulators\n"); | ||
523 | /* output disable */ | 526 | /* output disable */ |
524 | for (icnt = 0; icnt < 0x06; icnt++) | 527 | for (icnt = 0; icnt < 0x06; icnt++) |
525 | lp8755_write(pchip, icnt, 0x00); | 528 | lp8755_write(pchip, icnt, 0x00); |
526 | 529 | ||
527 | err_chip_init: | ||
528 | dev_err(&client->dev, "fail to initialize chip\n"); | ||
529 | return ret; | 530 | return ret; |
530 | } | 531 | } |
531 | 532 | ||