diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-04-27 13:58:08 +0800 |
---|---|---|
committer | Mark Brown <broonie@sirena.org.uk> | 2013-04-28 02:11:19 +0100 |
commit | 020501f1a0911af70873e4d3d122b2e1889ccd03 (patch) | |
tree | 0a5692eb87cfaf0b7ec46ac845a1d79a9fd576d8 /drivers/regulator/tps6524x-regulator.c | |
parent | 1e4b545cdd93318379c6b1fb0a99536fa3260f53 (diff) | |
download | blackbird-op-linux-020501f1a0911af70873e4d3d122b2e1889ccd03.tar.gz blackbird-op-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/tps6524x-regulator.c')
-rw-r--r-- | drivers/regulator/tps6524x-regulator.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/regulator/tps6524x-regulator.c b/drivers/regulator/tps6524x-regulator.c index 843ee0a9bb92..06e92761afdd 100644 --- a/drivers/regulator/tps6524x-regulator.c +++ b/drivers/regulator/tps6524x-regulator.c @@ -584,8 +584,7 @@ static int pmic_remove(struct spi_device *spi) if (!hw) return 0; for (i = 0; i < N_REGULATORS; i++) { - if (hw->rdev[i]) - regulator_unregister(hw->rdev[i]); + regulator_unregister(hw->rdev[i]); hw->rdev[i] = NULL; } spi_set_drvdata(spi, NULL); |