Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 46783a04 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown
Browse files

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: default avatarAxel Lin <axel.lin@gmail.com>
Acked-by: default avatarLaxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 22cd2fef
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -191,7 +191,7 @@ static int tps62360_dcdc_list_voltage(struct regulator_dev *dev,
{
{
	struct tps62360_chip *tps = rdev_get_drvdata(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 -EINVAL;
	return (tps->voltage_base + selector * 10) * 1000;
	return (tps->voltage_base + selector * 10) * 1000;
}
}