regulator: tps62360: Remove pointless test for unsigned less than zero
authorAxel Lin <axel.lin@gmail.com>
Tue, 7 Feb 2012 03:06:20 +0000 (11:06 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 11 Mar 2012 20:48:40 +0000 (20:48 +0000)
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>
drivers/regulator/tps62360-regulator.c

index f778ef0676963c6500eba0c40ad558842ec526be..e2ec73068ee2e1aac58fb0558697840d42e13f96 100644 (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;
 }