linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regulator: max8997: Test pdata by NULL checking instead of IS_ERR_OR_NULL
@ 2013-04-13 14:05 Axel Lin
  2013-04-15 16:22 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2013-04-13 14:05 UTC (permalink / raw)
  To: Mark Brown; +Cc: MyungJoo Ham, Liam Girdwood, linux-kernel

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




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] regulator: max8997: Test pdata by NULL checking instead of IS_ERR_OR_NULL
  2013-04-13 14:05 [PATCH] regulator: max8997: Test pdata by NULL checking instead of IS_ERR_OR_NULL Axel Lin
@ 2013-04-15 16:22 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2013-04-15 16:22 UTC (permalink / raw)
  To: Axel Lin; +Cc: MyungJoo Ham, Liam Girdwood, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 173 bytes --]

On Sat, Apr 13, 2013 at 10:05:43PM +0800, Axel Lin wrote:
> pdata is either a valid pointer or NULL, use NULL checking rather than
> IS_ERR_OR_NULL macro.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-15 16:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-13 14:05 [PATCH] regulator: max8997: Test pdata by NULL checking instead of IS_ERR_OR_NULL Axel Lin
2013-04-15 16:22 ` 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).