From 260974704ea4c01fb21166182e8b0cf266cbd77a Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Fri, 7 Mar 2014 12:56:00 +0000 Subject: [PATCH] staging: iio: ad9832: Remove redundant check 'val' is unsigned and cannot be negative. Signed-off-by: Sachin Kamat Cc: Michael Hennerich Signed-off-by: Jonathan Cameron --- 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 b7c8351ce2ff..cf68159a5848 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; } -- 2.34.1