lkml.org 
[lkml]   [2013]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] regulator: max8997: Test pdata by NULL checking instead of IS_ERR_OR_NULL
From
Date
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




\
 
 \ /
  Last update: 2013-04-13 16:21    [W:0.091 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site