All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio:adc:vf610 ensure correct handing of interruption of wait for completion
@ 2014-03-01 22:02 Jonathan Cameron
  2014-03-02  1:36 ` fugang.duan
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Cameron @ 2014-03-01 22:02 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Dan Carpenter, Fugang Duan

Issue highlighted by smatch warning:

CHECK   drivers/iio/adc/vf610_adc.c
drivers/iio/adc/vf610_adc.c:466 vf610_read_raw() warn: unsigned 'ret' is never less than zero.

As wait_for_completion_interruptible_timeout can return -ERESTARTSTSYS, if
interrupted, ret must be signed.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Fugang Duan <B38611@freescale.com>
---
 drivers/iio/adc/vf610_adc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/adc/vf610_adc.c b/drivers/iio/adc/vf610_adc.c
index 37f542e..44799eb5 100644
--- a/drivers/iio/adc/vf610_adc.c
+++ b/drivers/iio/adc/vf610_adc.c
@@ -447,7 +447,7 @@ static int vf610_read_raw(struct iio_dev *indio_dev,
 {
 	struct vf610_adc *info = iio_priv(indio_dev);
 	unsigned int hc_cfg;
-	unsigned long ret;
+	long ret;
 
 	switch (mask) {
 	case IIO_CHAN_INFO_RAW:
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-03-02 21:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-01 22:02 [PATCH] iio:adc:vf610 ensure correct handing of interruption of wait for completion Jonathan Cameron
2014-03-02  1:36 ` fugang.duan
2014-03-02 21:47   ` Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.