Skip to content

Commit

Permalink
regulator: tps65090: Use IS_ERR to check return value of regulator_re…
Browse files Browse the repository at this point in the history
…gister

regulator_register never returns NULL.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked by: Venu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Axel Lin authored and Mark Brown committed Apr 1, 2012
1 parent e181623 commit 0ca2d6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/tps65090-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ static int __devinit tps65090_regulator_probe(struct platform_device *pdev)

rdev = regulator_register(&ri->desc, &pdev->dev,
&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",
ri->desc.name);
return PTR_ERR(rdev);
Expand Down

0 comments on commit 0ca2d6e

Please sign in to comment.