From: Colin Ian King Date: Thu, 21 Feb 2019 10:46:36 +0000 (+0000) Subject: iio: st_accel: remove redundant unsigned less than zero check X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f6672544df43020013c4675cefd324009a3ce1b9;p=linux.git 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 Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c index a3c0916479fa6..9930edf423bfb 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