diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-02-06 22:06:20 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-11 16:48:40 -0400 |
commit | 46783a046e13588f0459271ad6db9785fa8dcb8b (patch) | |
tree | f0944269fb2ccd3570d6f36b18e65ee41a5dbb0b /drivers/regulator | |
parent | 22cd2fefba7bddd31dad892f5923854defac0da2 (diff) |
regulator: tps62360: Remove pointless test for unsigned less than zero
The variable 'selector' is a 'unsigned int', so it can never be less than zero.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/tps62360-regulator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/tps62360-regulator.c b/drivers/regulator/tps62360-regulator.c index f778ef067696..e2ec73068ee2 100644 --- a/drivers/regulator/tps62360-regulator.c +++ b/drivers/regulator/tps62360-regulator.c | |||
@@ -191,7 +191,7 @@ static int tps62360_dcdc_list_voltage(struct regulator_dev *dev, | |||
191 | { | 191 | { |
192 | struct tps62360_chip *tps = rdev_get_drvdata(dev); | 192 | struct tps62360_chip *tps = rdev_get_drvdata(dev); |
193 | 193 | ||
194 | if ((selector < 0) || (selector >= tps->desc.n_voltages)) | 194 | if (selector >= tps->desc.n_voltages) |
195 | return -EINVAL; | 195 | return -EINVAL; |
196 | return (tps->voltage_base + selector * 10) * 1000; | 196 | return (tps->voltage_base + selector * 10) * 1000; |
197 | } | 197 | } |