projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
23a3b8c
)
Staging: iio/dac/ad5360.c: signedness bug in ad5360_read_raw()
author
Dan Carpenter
<dan.carpenter@oracle.com>
Sat, 29 Oct 2011 07:21:06 +0000
(10:21 +0300)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Sun, 27 Nov 2011 00:38:32 +0000
(16:38 -0800)
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>
drivers/staging/iio/dac/ad5360.c
patch
|
blob
|
history
diff --git
a/drivers/staging/iio/dac/ad5360.c
b/drivers/staging/iio/dac/ad5360.c
index c5bf5827c1371a16983715e5a5b6a6f096ac0f18..012d7147e496e6e3dd5b4dc90d5528300ffaef07 100644
(file)
--- 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) {