dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Axel Lin 2012-02-07 11:06:20 +08:00 committed by Mark Brown
parent 22cd2fefba
commit 46783a046e
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}