regulator: Remove redundant NULL assignment
authorSachin Kamat <sachin.kamat@linaro.org>
Thu, 5 Sep 2013 03:52:03 +0000 (09:22 +0530)
committerMark Brown <broonie@linaro.org>
Mon, 16 Sep 2013 23:28:44 +0000 (00:28 +0100)
NULL assignment corrupts the error pointer and is not
necessary.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/max77686.c
drivers/regulator/max77693.c
drivers/regulator/max8997.c

index de5b30e..ae001cc 100644 (file)
@@ -483,7 +483,6 @@ static int max77686_pmic_probe(struct platform_device *pdev)
                if (IS_ERR(max77686->rdev[i])) {
                        dev_err(&pdev->dev,
                                "regulator init failed for %d\n", i);
-                       max77686->rdev[i] = NULL;
                        return PTR_ERR(max77686->rdev[i]);
                }
        }
index 2054ae1..feb20bf 100644 (file)
@@ -271,7 +271,6 @@ static int max77693_pmic_probe(struct platform_device *pdev)
                if (IS_ERR(max77693_pmic->rdev[i])) {
                        dev_err(max77693_pmic->dev,
                                "Failed to initialize regulator-%d\n", id);
-                       max77693_pmic->rdev[i] = NULL;
                        return PTR_ERR(max77693_pmic->rdev[i]);
                }
        }
index 059e8ed..bcd2488 100644 (file)
@@ -1209,7 +1209,6 @@ static int max8997_pmic_probe(struct platform_device *pdev)
                if (IS_ERR(rdev[i])) {
                        dev_err(max8997->dev, "regulator init failed for %d\n",
                                        id);
-                       rdev[i] = NULL;
                        return PTR_ERR(rdev[i]);
                }
        }