Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: twl6030: remove redundant range check min_uV > 1300000 && min_uV <= 1350000

It has been pointed out to me that the range for vsel = 58 is actually
dead code as this is covered by an earlier check for (min_uV >= 700000)
&& (min_uV <= 1420000) so remove that check completely.

Reported-by: Alban Auzeill <alban.auzeill@sonarsource.com>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Colin Ian King and committed by
Mark Brown
c635df49 d00b7461

-2
-2
drivers/regulator/twl6030-regulator.c
··· 456 456 vsel = 60; 457 457 else if ((min_uV > 1350000) && (min_uV <= 1500000)) 458 458 vsel = 59; 459 - else if ((min_uV > 1300000) && (min_uV <= 1350000)) 460 - vsel = 58; 461 459 else 462 460 return -EINVAL; 463 461 break;