From: Axel Lin <axel.lin@ingics.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Daniel Jeong <gshark.jeong@gmail.com>, Liam Girdwood <lrg@ti.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] regulator: lp8755: Don't show unrelated messags in lp8755_probe error paths
Date: Sat, 12 Jan 2013 14:58:35 +0800 [thread overview]
Message-ID: <1357973915.16304.1.camel@phoenix> (raw)
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
next reply other threads:[~2013-01-12 6:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-12 6:58 Axel Lin [this message]
2013-01-17 5:28 ` [PATCH] regulator: lp8755: Don't show unrelated messags in lp8755_probe error paths gshark
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=1357973915.16304.1.camel@phoenix \
--to=axel.lin@ingics.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=gshark.jeong@gmail.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).