summaryrefslogtreecommitdiff
path: root/drivers/regulator/max1586.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-04-27 13:58:08 +0800
committerMark Brown <broonie@sirena.org.uk>2013-04-28 02:11:19 +0100
commit020501f1a0911af70873e4d3d122b2e1889ccd03 (patch)
tree0a5692eb87cfaf0b7ec46ac845a1d79a9fd576d8 /drivers/regulator/max1586.c
parent1e4b545cdd93318379c6b1fb0a99536fa3260f53 (diff)
regulator: Remove NULL test before calling regulator_unregister()
It's safe to call regulator_unregister() with NULL, thus remove the NULL test before regulator_unregister() calls. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@sirena.org.uk>
Diffstat (limited to 'drivers/regulator/max1586.c')
-rw-r--r--drivers/regulator/max1586.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/regulator/max1586.c b/drivers/regulator/max1586.c
index 8c5a54f541b5..6b2217b404b2 100644
--- a/drivers/regulator/max1586.c
+++ b/drivers/regulator/max1586.c
@@ -232,8 +232,7 @@ static int max1586_pmic_remove(struct i2c_client *client)
int i;
for (i = 0; i <= MAX1586_V6; i++)
- if (max1586->rdev[i])
- regulator_unregister(max1586->rdev[i]);
+ regulator_unregister(max1586->rdev[i]);
return 0;
}