'val' is unsigned and cannot be negative. Signed-off-by: Sachin Kamat <sachin.kamat@xxxxxxxxxxx> Cc: Michael Hennerich <hennerich@xxxxxxxxxxxxxxxxxxxx> --- drivers/staging/iio/frequency/ad9832.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/iio/frequency/ad9832.c b/drivers/staging/iio/frequency/ad9832.c index b7c8351..cf68159 100644 --- a/drivers/staging/iio/frequency/ad9832.c +++ b/drivers/staging/iio/frequency/ad9832.c @@ -120,7 +120,7 @@ static ssize_t ad9832_write(struct device *dev, struct device_attribute *attr, ret = spi_sync(st->spi, &st->msg); break; case AD9832_PHASE_SYM: - if (val < 0 || val > 3) { + if (val > 3) { ret = -EINVAL; break; } -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html