Commit 0ca2d6e6 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

regulator: tps65090: Use IS_ERR to check return value of regulator_register

regulator_register never returns NULL.
Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Acked by: Venu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent e1816235
...@@ -153,7 +153,7 @@ static int __devinit tps65090_regulator_probe(struct platform_device *pdev) ...@@ -153,7 +153,7 @@ static int __devinit tps65090_regulator_probe(struct platform_device *pdev)
rdev = regulator_register(&ri->desc, &pdev->dev, rdev = regulator_register(&ri->desc, &pdev->dev,
&tps_pdata->regulator, ri, NULL); &tps_pdata->regulator, ri, NULL);
if (IS_ERR_OR_NULL(rdev)) { if (IS_ERR(rdev)) {
dev_err(&pdev->dev, "failed to register regulator %s\n", dev_err(&pdev->dev, "failed to register regulator %s\n",
ri->desc.name); ri->desc.name);
return PTR_ERR(rdev); return PTR_ERR(rdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment