Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

authored by

Axel Lin and committed by
Mark Brown
a2f07305 41ef2d56

+2 -2
+2 -2
drivers/regulator/max8997.c
··· 1035 1035 int i, ret, size, nr_dvs; 1036 1036 u8 max_buck1 = 0, max_buck2 = 0, max_buck5 = 0; 1037 1037 1038 - if (IS_ERR_OR_NULL(pdata)) { 1039 - dev_err(pdev->dev.parent, "No platform init data supplied.\n"); 1038 + if (!pdata) { 1039 + dev_err(&pdev->dev, "No platform init data supplied.\n"); 1040 1040 return -ENODEV; 1041 1041 } 1042 1042