From: Axel Lin Date: Sat, 13 Apr 2013 14:05:43 +0000 (+0800) Subject: regulator: max8997: Test pdata by NULL checking instead of IS_ERR_OR_NULL X-Git-Tag: v3.12-rc1~994^2~11^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a2f07305e53545dceb08724ed86345c198b2a91a;p=kernel%2Fkernel-generic.git 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. Signed-off-by: Axel Lin Signed-off-by: Mark Brown --- 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; }