* [PATCH] regulator: lp8755: Don't show unrelated messags in lp8755_probe error paths
@ 2013-01-12 6:58 Axel Lin
2013-01-17 5:28 ` gshark
2013-01-17 7:13 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2013-01-12 6:58 UTC (permalink / raw)
To: Mark Brown; +Cc: Daniel Jeong, Liam Girdwood, linux-kernel
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/regulator/lp8755.c | 19 ++++++++++---------
1 file 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;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] regulator: lp8755: Don't show unrelated messags in lp8755_probe error paths
2013-01-12 6:58 [PATCH] regulator: lp8755: Don't show unrelated messags in lp8755_probe error paths Axel Lin
@ 2013-01-17 5:28 ` gshark
2013-01-17 7:13 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: gshark @ 2013-01-17 5:28 UTC (permalink / raw)
To: Axel Lin; +Cc: Mark Brown, Liam Girdwood, linux-kernel
2013년 01월 12일 15:58, Axel Lin 쓴 글:
> Signed-off-by: Axel Lin<axel.lin@ingics.com>
> ---
> drivers/regulator/lp8755.c | 19 ++++++++++---------
> 1 file 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;
> }
>
It is nice to us also and this patch was tested using a lp8755 board.
Thank you Axel.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] regulator: lp8755: Don't show unrelated messags in lp8755_probe error paths
2013-01-12 6:58 [PATCH] regulator: lp8755: Don't show unrelated messags in lp8755_probe error paths Axel Lin
2013-01-17 5:28 ` gshark
@ 2013-01-17 7:13 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2013-01-17 7:13 UTC (permalink / raw)
To: Axel Lin; +Cc: Daniel Jeong, Liam Girdwood, linux-kernel
On Sat, Jan 12, 2013 at 02:58:35PM +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-01-17 7:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-12 6:58 [PATCH] regulator: lp8755: Don't show unrelated messags in lp8755_probe error paths Axel Lin
2013-01-17 5:28 ` gshark
2013-01-17 7:13 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).