Skip to contentSkip to conversation

regulator: max8997: Test pdata by NULL checking instead of IS_ERR_OR_NULL

PATCH Applied Axel Lin 2 participants 2 messages Apr 13, 2013 – Apr 15, 2013 Voltage and current regulator framework

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 regulator: max8997: Test pdata by NULL checking instead of IS_ERR_OR_NULL

pdata is either a valid pointer or NULL, use NULL checking rather than IS_ERR_OR_NULL macro.

---
 drivers/regulator/max8997.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/regulator/max8997.c +2 -2
index 0ac7a87..df20069 100644
@@ -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;
 	}
 
Signature · 1 line
1.7.10.4
maintainer Applied
#1 lore raw
Quoted 2 lines · Axel Lin

pdata is either a valid pointer or NULL, use NULL checking rather than IS_ERR_OR_NULL macro.

Applied, thanks.