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>
This commit is contained in:
Axel Lin 2013-01-25 21:29:41 +08:00 committed by Mark Brown
parent 949db153b6
commit d4cbca9ef8
1 changed files with 1 additions and 1 deletions

View File

@ -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);