From: gshark <gshark.jeong@gmail.com>
To: Axel Lin <axel.lin@ingics.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
Liam Girdwood <lrg@ti.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] regulator: lp8755: Don't show unrelated messags in lp8755_probe error paths
Date: Thu, 17 Jan 2013 14:28:38 +0900 [thread overview]
Message-ID: <50F78C06.8050705@gmail.com> (raw)
In-Reply-To: <1357973915.16304.1.camel@phoenix>
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.
next prev parent reply other threads:[~2013-01-17 5:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2013-01-17 7:13 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50F78C06.8050705@gmail.com \
--to=gshark.jeong@gmail.com \
--cc=axel.lin@ingics.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).