diff options
author | Jesper Juhl <jj@chaosbits.net> | 2011-02-23 23:45:55 +0100 |
---|---|---|
committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2011-02-25 08:51:07 +0000 |
commit | 4b2f67d756cf4a5ed8e8d11caa7dcea06c41a09e (patch) | |
tree | 35a48fdafe807d07bbf685b589c290a49b3958a4 /drivers/regulator | |
parent | 9ee291a453c1db310c0298f8e6c28794cd2c52bd (diff) | |
download | op-kernel-dev-4b2f67d756cf4a5ed8e8d11caa7dcea06c41a09e.zip op-kernel-dev-4b2f67d756cf4a5ed8e8d11caa7dcea06c41a09e.tar.gz |
regulator, mc13xxx: Remove pointless test for unsigned less than zero
The variable 'val' is a 'unsigned int', so it can never be less than zero.
This fact makes the "val < 0" part of the test done in BUG_ON() in
mc13xxx_regulator_get_voltage() rather pointles since it can never have
any effect.
This patch removes the pointless test.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/mc13xxx-regulator-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/mc13xxx-regulator-core.c b/drivers/regulator/mc13xxx-regulator-core.c index f53d31b..2bb5de1 100644 --- a/drivers/regulator/mc13xxx-regulator-core.c +++ b/drivers/regulator/mc13xxx-regulator-core.c @@ -174,7 +174,7 @@ static int mc13xxx_regulator_get_voltage(struct regulator_dev *rdev) dev_dbg(rdev_get_dev(rdev), "%s id: %d val: %d\n", __func__, id, val); - BUG_ON(val < 0 || val > mc13xxx_regulators[id].desc.n_voltages); + BUG_ON(val > mc13xxx_regulators[id].desc.n_voltages); return mc13xxx_regulators[id].voltages[val]; } |