diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-02-07 11:06:20 +0800 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-06-01 13:07:12 -0700 |
commit | 461ef9b774c6f079373898a3eed045f183662a8f (patch) | |
tree | 637972bef6581db006aeb3b4c71b1877eee57179 /drivers/regulator | |
parent | 2c596cbe2ed008c047a695e77aa687564c8cf74d (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>
(cherry picked from commit 46783a046e13588f0459271ad6db9785fa8dcb8b)
Change-Id: I920b1628016b7d1c0b626497f24210c5c1f549ab
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/105825
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit
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 7eaf08275376..2be1dcf00b47 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, { struct tps62360_chip *tps = rdev_get_drvdata(dev); - if ((selector < 0) || (selector >= tps->desc.n_voltages)) + if (selector >= tps->desc.n_voltages) return -EINVAL; return (tps->voltage_base + selector * 10) * 1000; } |