[PATCH 2/2] regulator: Remove redundant NULL assignment

From: Sachin Kamat
Date: Thu Sep 05 2013 - 00:10:01 EST


NULL assignment corrupts the error pointer and is not
necessary.

Reported-by: kbuild test robot <fengguang.wu@xxxxxxxxx>
Signed-off-by: Sachin Kamat <sachin.kamat@xxxxxxxxxx>
---
drivers/regulator/max77686.c | 1 -
drivers/regulator/max77693.c | 1 -
drivers/regulator/max8997.c | 1 -
3 files changed, 3 deletions(-)

diff --git a/drivers/regulator/max77686.c b/drivers/regulator/max77686.c
index de5b30e..ae001cc 100644
--- a/drivers/regulator/max77686.c
+++ b/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]);
}
}
diff --git a/drivers/regulator/max77693.c b/drivers/regulator/max77693.c
index 2054ae1..feb20bf 100644
--- a/drivers/regulator/max77693.c
+++ b/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]);
}
}
diff --git a/drivers/regulator/max8997.c b/drivers/regulator/max8997.c
index 059e8ed..bcd2488 100644
--- a/drivers/regulator/max8997.c
+++ b/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]);
}
}
--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/