summaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-01-12 14:58:35 +0800
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-01-17 16:13:19 +0900
commit240a529108a11d235328a140fe6b03cf76cef099 (patch)
tree9fc0d546173b4f8199dc2d0bfba8000300d41aba /drivers/regulator
parentcad877ef0af8d18aae88bb7d0f30f747f003fd0f (diff)
downloadop-kernel-dev-240a529108a11d235328a140fe6b03cf76cef099.zip
op-kernel-dev-240a529108a11d235328a140fe6b03cf76cef099.tar.gz
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')
-rw-r--r--drivers/regulator/lp8755.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/regulator/lp8755.c b/drivers/regulator/lp8755.c
index decb3ad..8c3f3f2 100644
--- a/drivers/regulator/lp8755.c
+++ b/drivers/regulator/lp8755.c
@@ -497,35 +497,36 @@ static int lp8755_probe(struct i2c_client *client,
if (!pchip->pdata)
return -ENOMEM;
ret = lp8755_init_data(pchip);
- if (ret < 0)
- goto err_chip_init;
+ if (ret < 0) {
+ dev_err(&client->dev, "fail to initialize chip\n");
+ return ret;
+ }
}
ret = lp8755_regulator_init(pchip);
- if (ret < 0)
+ if (ret < 0) {
+ dev_err(&client->dev, "fail to initialize regulators\n");
goto err_regulator;
+ }
pchip->irq = client->irq;
ret = lp8755_int_config(pchip);
- if (ret < 0)
+ if (ret < 0) {
+ dev_err(&client->dev, "fail to irq config\n");
goto err_irq;
+ }
return ret;
err_irq:
- dev_err(&client->dev, "fail to irq config\n");
-
for (icnt = 0; icnt < mphase_buck[pchip->mphase].nreg; icnt++)
regulator_unregister(pchip->rdev[icnt]);
err_regulator:
- dev_err(&client->dev, "fail to initialize regulators\n");
/* output disable */
for (icnt = 0; icnt < 0x06; icnt++)
lp8755_write(pchip, icnt, 0x00);
-err_chip_init:
- dev_err(&client->dev, "fail to initialize chip\n");
return ret;
}
OpenPOWER on IntegriCloud