diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-04-27 09:58:08 +0400 |
---|---|---|
committer | Mark Brown <broonie@sirena.org.uk> | 2013-04-28 05:11:19 +0400 |
commit | 020501f1a0911af70873e4d3d122b2e1889ccd03 (patch) | |
tree | 0a5692eb87cfaf0b7ec46ac845a1d79a9fd576d8 /drivers/regulator/max8660.c | |
parent | 1e4b545cdd93318379c6b1fb0a99536fa3260f53 (diff) | |
download | linux-020501f1a0911af70873e4d3d122b2e1889ccd03.tar.xz |
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/max8660.c')
-rw-r--r-- | drivers/regulator/max8660.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/regulator/max8660.c b/drivers/regulator/max8660.c index 4d7c635c36c2..d428ef9a626f 100644 --- a/drivers/regulator/max8660.c +++ b/drivers/regulator/max8660.c @@ -426,8 +426,7 @@ static int max8660_remove(struct i2c_client *client) int i; for (i = 0; i < MAX8660_V_END; i++) - if (max8660->rdev[i]) - regulator_unregister(max8660->rdev[i]); + regulator_unregister(max8660->rdev[i]); return 0; } |