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

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

regulator: tps80031: Use IS_ERR to check return value of regulator_register()



regulator_register() does not return NULL, it returns ERR_PTR on error.

Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 949db153
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -728,7 +728,7 @@ static int tps80031_regulator_probe(struct platform_device *pdev)
			}
		}
		rdev = regulator_register(&ri->rinfo->desc, &config);
		if (IS_ERR_OR_NULL(rdev)) {
		if (IS_ERR(rdev)) {
			dev_err(&pdev->dev,
				"register regulator failed %s\n",
					ri->rinfo->desc.name);