From: Axel Lin Date: Tue, 7 Feb 2012 03:06:20 +0000 (+0800) Subject: regulator: tps62360: Remove pointless test for unsigned less than zero X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=46783a046e13588f0459271ad6db9785fa8dcb8b;p=linux-beck.git 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 Acked-by: Laxman Dewangan Signed-off-by: Mark Brown --- 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, { 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; }