regulator: tps65090: Use IS_ERR to check return value of regulator_register
Laxman Dewangan [Thu, 2 Aug 2012 12:42:04 +0000 (17:42 +0530)]
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>
(Cherry-picked from mainline
0ca2d6e65268477a53f959320a43d13b0c4d6b70)

Conflicts:

drivers/regulator/tps65090-regulator.c

Change-Id: Id79e2beb2a3e278ace32054c19c463783f334a16
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/120372

drivers/regulator/tps65090-regulator.c

index 0dee06d..7dc4e1c 100644 (file)
@@ -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);
-       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);