]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
regulator: tps65090: Use IS_ERR to check return value of regulator_register
authorAxel Lin <axel.lin@gmail.com>
Sat, 24 Mar 2012 02:56:00 +0000 (10:56 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 1 Apr 2012 10:59:32 +0000 (11:59 +0100)
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>
drivers/regulator/tps65090-regulator.c

index 6c28e3a3f664cbda3511fccf95133cf90c576a31..470ca7e366cfc4797cbaacfdb5961121df86ece8 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, 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);