From 685e010748f64a752a981254101e976d7291d16c Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Sat, 29 Oct 2011 10:21:06 +0300 Subject: [PATCH] Staging: iio/dac/ad5360.c: signedness bug in ad5360_read_raw() ad5360_get_channel_vref() returns an int and scale_uv should be the same. Making it unsigned here breaks the error handling. Signed-off-by: Dan Carpenter Acked-by: Lars-Peter Clausen Acked-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/staging/iio/dac/ad5360.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/iio/dac/ad5360.c b/drivers/staging/iio/dac/ad5360.c index c5bf5827c137..012d7147e496 100644 --- a/drivers/staging/iio/dac/ad5360.c +++ b/drivers/staging/iio/dac/ad5360.c @@ -371,8 +371,8 @@ static int ad5360_read_raw(struct iio_dev *indio_dev, long m) { struct ad5360_state *st = iio_priv(indio_dev); - unsigned long scale_uv; unsigned int ofs_index; + int scale_uv; int ret; switch (m) {