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

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

regulator: da9063: 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@linaro.org>
parent 556dcf90
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -848,7 +848,7 @@ static int da9063_regulator_probe(struct platform_device *pdev)
			config.of_node = da9063_reg_matches[id].of_node;
		config.regmap = da9063->regmap;
		regl->rdev = regulator_register(&regl->desc, &config);
		if (IS_ERR_OR_NULL(regl->rdev)) {
		if (IS_ERR(regl->rdev)) {
			dev_err(&pdev->dev,
				"Failed to register %s regulator\n",
				regl->desc.name);