summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/s5m8767.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/s5m8767.c
parent1e4b545cdd93318379c6b1fb0a99536fa3260f53 (diff)
downloadtalos-obmc-linux-020501f1a0911af70873e4d3d122b2e1889ccd03.tar.gz
talos-obmc-linux-020501f1a0911af70873e4d3d122b2e1889ccd03.zip
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/s5m8767.c')
-rw-r--r--drivers/regulator/s5m8767.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/regulator/s5m8767.c b/drivers/regulator/s5m8767.c
index 8a831947c351..2dd74e254397 100644
--- a/drivers/regulator/s5m8767.c
+++ b/drivers/regulator/s5m8767.c
@@ -923,8 +923,7 @@ static int s5m8767_pmic_probe(struct platform_device *pdev)
return 0;
err:
for (i = 0; i < s5m8767->num_regulators; i++)
- if (rdev[i])
- regulator_unregister(rdev[i]);
+ regulator_unregister(rdev[i]);
return ret;
}
@@ -936,8 +935,7 @@ static int s5m8767_pmic_remove(struct platform_device *pdev)
int i;
for (i = 0; i < s5m8767->num_regulators; i++)
- if (rdev[i])
- regulator_unregister(rdev[i]);
+ regulator_unregister(rdev[i]);
return 0;
}
OpenPOWER on IntegriCloud