diff options
| author | Axel Lin <axel.lin@ingics.com> | 2013-01-25 08:29:41 -0500 |
|---|---|---|
| committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-01-26 02:40:36 -0500 |
| commit | d4cbca9ef822e05d4b55e7d0f1cdfded7a472a56 (patch) | |
| tree | 323b1dde4f0938b2a975ab873e96d9028908767c | |
| parent | 949db153b6466c6f7cad5a427ecea94985927311 (diff) | |
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: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| -rw-r--r-- | drivers/regulator/tps80031-regulator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/tps80031-regulator.c b/drivers/regulator/tps80031-regulator.c index b15d711bc8c6..9019d0e7ecb6 100644 --- a/drivers/regulator/tps80031-regulator.c +++ b/drivers/regulator/tps80031-regulator.c | |||
| @@ -728,7 +728,7 @@ static int tps80031_regulator_probe(struct platform_device *pdev) | |||
| 728 | } | 728 | } |
| 729 | } | 729 | } |
| 730 | rdev = regulator_register(&ri->rinfo->desc, &config); | 730 | rdev = regulator_register(&ri->rinfo->desc, &config); |
| 731 | if (IS_ERR_OR_NULL(rdev)) { | 731 | if (IS_ERR(rdev)) { |
| 732 | dev_err(&pdev->dev, | 732 | dev_err(&pdev->dev, |
| 733 | "register regulator failed %s\n", | 733 | "register regulator failed %s\n", |
| 734 | ri->rinfo->desc.name); | 734 | ri->rinfo->desc.name); |
