summaryrefslogtreecommitdiff
path: root/drivers/regulator/tps62360-regulator.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator/tps62360-regulator.c')
-rw-r--r--drivers/regulator/tps62360-regulator.c2
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;
}