Browse Source

regulator: Remove redundant NULL assignment

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>
Sachin Kamat 12 years ago
parent
commit
cab87f062d
3 changed files with 0 additions and 3 deletions
  1. 0 1
      drivers/regulator/max77686.c
  2. 0 1
      drivers/regulator/max77693.c
  3. 0 1
      drivers/regulator/max8997.c

+ 0 - 1
drivers/regulator/max77686.c

@@ -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]);
 		}
 	}

+ 0 - 1
drivers/regulator/max77693.c

@@ -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]);
 		}
 	}

+ 0 - 1
drivers/regulator/max8997.c

@@ -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]);
 		}
 	}