提交 46783a04 编写于 作者: A Axel Lin 提交者: Mark Brown

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: NAxel Lin <axel.lin@gmail.com>
Acked-by: NLaxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 22cd2fef
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册