Re: [PATCH 1/1] staging: iio: ad9832: Remove redundant check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/07/14 12:56, Sachin Kamat wrote:
'val' is unsigned and cannot be negative.

Signed-off-by: Sachin Kamat <sachin.kamat@xxxxxxxxxxx>
Cc: Michael Hennerich <hennerich@xxxxxxxxxxxxxxxxxxxx>
Applied to the togreg branch of iio.git

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


--
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




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux