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

iio: frequency: admv1013: remove the always true condition

unsigned int variable is always greater than or equal to zero. Make the
if condition simple.

Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Fixes: da35a7b526d9 ("iio: frequency: admv1013: add support for ADMV1013")
Link: https://lore.kernel.org/r/YdS3gJYtECMaDDjA@debian-BULLSEYE-live-builder-AMD64
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Muhammad Usama Anjum and committed by
Jonathan Cameron
a1cba0e2 ccbed9d8

+1 -1
+1 -1
drivers/iio/frequency/admv1013.c
··· 348 348 349 349 vcm = regulator_get_voltage(st->reg); 350 350 351 - if (vcm >= 0 && vcm < 1800000) 351 + if (vcm < 1800000) 352 352 mixer_vgate = (2389 * vcm / 1000000 + 8100) / 100; 353 353 else if (vcm > 1800000 && vcm < 2600000) 354 354 mixer_vgate = (2375 * vcm / 1000000 + 125) / 100;