summaryrefslogtreecommitdiff
path: root/drivers/iio
diff options
context:
space:
mode:
authorMuhammad Usama Anjum <usama.anjum@collabora.com>2022-01-05 02:09:20 +0500
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-01-30 11:50:16 +0000
commita1cba0e2deeb0fe5200602658ed1078a714f8667 (patch)
tree3e0af5e99ee835bc3ddab9a161aa231e11040c4d /drivers/iio
parentccbed9d8d2a5351d8238f2d3f0741c9a3176f752 (diff)
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>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/frequency/admv1013.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/frequency/admv1013.c b/drivers/iio/frequency/admv1013.c
index 6cdeb50143af..3f3c478e9baa 100644
--- a/drivers/iio/frequency/admv1013.c
+++ b/drivers/iio/frequency/admv1013.c
@@ -348,7 +348,7 @@ static int admv1013_update_mixer_vgate(struct admv1013_state *st)
vcm = regulator_get_voltage(st->reg);
- if (vcm >= 0 && vcm < 1800000)
+ if (vcm < 1800000)
mixer_vgate = (2389 * vcm / 1000000 + 8100) / 100;
else if (vcm > 1800000 && vcm < 2600000)
mixer_vgate = (2375 * vcm / 1000000 + 125) / 100;