From: Axel Lin Date: Fri, 30 Aug 2013 12:08:42 +0000 (+0800) Subject: regulator: da9063: Use IS_ERR to check return value of regulator_register() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=e515800b74e80c8d507d52e4703b00138daf75b2;p=openwrt%2Fstaging%2Fblogic.git 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: Axel Lin Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/da9063-regulator.c b/drivers/regulator/da9063-regulator.c index f29e7290cc94..139ad453d773 100644 --- a/drivers/regulator/da9063-regulator.c +++ b/drivers/regulator/da9063-regulator.c @@ -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(®l->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);