Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a2f07305 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown
Browse files

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: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 41ef2d56
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
	}