1
0
Fork 0

staging: iio: ad9832: Remove redundant check

'val' is unsigned and cannot be negative.

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Cc: Michael Hennerich <hennerich@blackfin.uclinux.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
hifive-unleashed-5.1
Sachin Kamat 2014-03-07 12:56:00 +00:00 committed by Jonathan Cameron
parent fb123a6b6b
commit 260974704e
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}