diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-08-30 08:08:42 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-08-30 10:24:42 -0400 |
commit | e515800b74e80c8d507d52e4703b00138daf75b2 (patch) | |
tree | d488585df417d6cb0d46d4950607a4adf1097395 /drivers/regulator/da9063-regulator.c | |
parent | 556dcf903d8a22aa1b3eb743aeffd4849eef2e24 (diff) |
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 <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator/da9063-regulator.c')
-rw-r--r-- | drivers/regulator/da9063-regulator.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
848 | config.of_node = da9063_reg_matches[id].of_node; | 848 | config.of_node = da9063_reg_matches[id].of_node; |
849 | config.regmap = da9063->regmap; | 849 | config.regmap = da9063->regmap; |
850 | regl->rdev = regulator_register(®l->desc, &config); | 850 | regl->rdev = regulator_register(®l->desc, &config); |
851 | if (IS_ERR_OR_NULL(regl->rdev)) { | 851 | if (IS_ERR(regl->rdev)) { |
852 | dev_err(&pdev->dev, | 852 | dev_err(&pdev->dev, |
853 | "Failed to register %s regulator\n", | 853 | "Failed to register %s regulator\n", |
854 | regl->desc.name); | 854 | regl->desc.name); |