diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2011-10-29 07:21:06 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-27 00:38:32 (GMT) |
commit | 685e010748f64a752a981254101e976d7291d16c (patch) | |
tree | a33e16b0b20e8a117cb7e613e85f6dbf3201714f /drivers | |
parent | 23a3b8cc9ce1bec3e21ca6e90566cf30caa760e5 (diff) | |
download | linux-685e010748f64a752a981254101e976d7291d16c.tar.xz |
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 <dan.carpenter@oracle.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/iio/dac/ad5360.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/iio/dac/ad5360.c b/drivers/staging/iio/dac/ad5360.c index c5bf582..012d714 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) { |