* [PATCH 1/1] staging: iio: ad9832: Remove redundant check
@ 2014-07-03 11:56 Sachin Kamat
2014-07-07 12:32 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Sachin Kamat @ 2014-07-03 11:56 UTC (permalink / raw)
To: linux-iio; +Cc: jic23, gregkh, spk.linux, Michael Hennerich
'val' is unsigned and cannot be negative.
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Cc: Michael Hennerich <hennerich@blackfin.uclinux.org>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] staging: iio: ad9832: Remove redundant check
2014-07-03 11:56 [PATCH 1/1] staging: iio: ad9832: Remove redundant check Sachin Kamat
@ 2014-07-07 12:32 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2014-07-07 12:32 UTC (permalink / raw)
To: Sachin Kamat, linux-iio; +Cc: gregkh, spk.linux, Michael Hennerich
On 03/07/14 12:56, Sachin Kamat wrote:
> 'val' is unsigned and cannot be negative.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
> Cc: Michael Hennerich <hennerich@blackfin.uclinux.org>
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;
> }
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-07-07 12:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-03 11:56 [PATCH 1/1] staging: iio: ad9832: Remove redundant check Sachin Kamat
2014-07-07 12:32 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).