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 de5b30ea823c93b0d71305396caf6be96c5f9eb4..ae001ccf26f42d952bec37c2a821c250e2307b3c 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 2054ae1c496e8b67fcfaa58d358f6dd4f9dd4f46..feb20bf4ccab4b056003896773ae86dec5c7219e 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 059e8ed7fa24f2c229fe1913dd612915ed884a85..bcd2488d1252e833a0bd7f3c63d29b1ae5d13bd8 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]);
                }
        }