Commit 240a5291 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

regulator: lp8755: Don't show unrelated messags in lp8755_probe error paths

Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent cad877ef
...@@ -497,35 +497,36 @@ static int lp8755_probe(struct i2c_client *client, ...@@ -497,35 +497,36 @@ static int lp8755_probe(struct i2c_client *client,
if (!pchip->pdata) if (!pchip->pdata)
return -ENOMEM; return -ENOMEM;
ret = lp8755_init_data(pchip); ret = lp8755_init_data(pchip);
if (ret < 0) if (ret < 0) {
goto err_chip_init; dev_err(&client->dev, "fail to initialize chip\n");
return ret;
}
} }
ret = lp8755_regulator_init(pchip); ret = lp8755_regulator_init(pchip);
if (ret < 0) if (ret < 0) {
dev_err(&client->dev, "fail to initialize regulators\n");
goto err_regulator; goto err_regulator;
}
pchip->irq = client->irq; pchip->irq = client->irq;
ret = lp8755_int_config(pchip); ret = lp8755_int_config(pchip);
if (ret < 0) if (ret < 0) {
dev_err(&client->dev, "fail to irq config\n");
goto err_irq; goto err_irq;
}
return ret; return ret;
err_irq: err_irq:
dev_err(&client->dev, "fail to irq config\n");
for (icnt = 0; icnt < mphase_buck[pchip->mphase].nreg; icnt++) for (icnt = 0; icnt < mphase_buck[pchip->mphase].nreg; icnt++)
regulator_unregister(pchip->rdev[icnt]); regulator_unregister(pchip->rdev[icnt]);
err_regulator: err_regulator:
dev_err(&client->dev, "fail to initialize regulators\n");
/* output disable */ /* output disable */
for (icnt = 0; icnt < 0x06; icnt++) for (icnt = 0; icnt < 0x06; icnt++)
lp8755_write(pchip, icnt, 0x00); lp8755_write(pchip, icnt, 0x00);
err_chip_init:
dev_err(&client->dev, "fail to initialize chip\n");
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment