From: Axel Lin <axel.lin@ingics.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: MyungJoo Ham <myungjoo.ham@smasung.com>,
Liam Girdwood <lgirdwood@gmail.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] regulator: max8997: Test pdata by NULL checking instead of IS_ERR_OR_NULL
Date: Sat, 13 Apr 2013 22:05:43 +0800 [thread overview]
Message-ID: <1365861943.3814.3.camel@phoenix> (raw)
pdata is either a valid pointer or NULL, use NULL checking rather than
IS_ERR_OR_NULL macro.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/regulator/max8997.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/max8997.c b/drivers/regulator/max8997.c
index 0ac7a87..df20069 100644
--- a/drivers/regulator/max8997.c
+++ b/drivers/regulator/max8997.c
@@ -1035,8 +1035,8 @@ static int max8997_pmic_probe(struct platform_device *pdev)
int i, ret, size, nr_dvs;
u8 max_buck1 = 0, max_buck2 = 0, max_buck5 = 0;
- if (IS_ERR_OR_NULL(pdata)) {
- dev_err(pdev->dev.parent, "No platform init data supplied.\n");
+ if (!pdata) {
+ dev_err(&pdev->dev, "No platform init data supplied.\n");
return -ENODEV;
}
--
1.7.10.4
next reply other threads:[~2013-04-13 14:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-13 14:05 Axel Lin [this message]
2013-04-15 16:22 ` [PATCH] regulator: max8997: Test pdata by NULL checking instead of IS_ERR_OR_NULL 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=1365861943.3814.3.camel@phoenix \
--to=axel.lin@ingics.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=myungjoo.ham@smasung.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