summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2019-02-21 10:46:36 +0000
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2019-04-04 20:19:50 +0100
commitf6672544df43020013c4675cefd324009a3ce1b9 (patch)
treee5eb47fef8a5b338d49e0a505d6e512f1406821c /drivers
parente132f62b9fabad809dccc9f8e1847496b1538376 (diff)
iio: st_accel: remove redundant unsigned less than zero check
The check that variable val is less than zero is redundant since val is an unsigned int and hence can never be less than zero. Remove it. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iio/accel/st_accel_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c
index a3c0916479fa..9930edf423bf 100644
--- a/drivers/iio/accel/st_accel_core.c
+++ b/drivers/iio/accel/st_accel_core.c
@@ -992,7 +992,7 @@ static int apply_acpi_orientation(struct iio_dev *indio_dev,
goto out;
val = elements[i].integer.value;
- if (val < 0 || val > 2)
+ if (val > 2)
goto out;
/* Avoiding full matrix multiplication, we simply reorder the