Staging: iio/dac/ad5064.c: signedness bug in ad5064_read_raw()

regulator_get_voltage() returns an int so "scale_uv" should be an
int.  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>
This commit is contained in:
Dan Carpenter 2011-10-29 10:20:42 +03:00 committed by Greg Kroah-Hartman
parent c8a9f8056f
commit 23a3b8cc9c
1 changed files with 1 additions and 1 deletions

View File

@ -280,8 +280,8 @@ static int ad5064_read_raw(struct iio_dev *indio_dev,
long m)
{
struct ad5064_state *st = iio_priv(indio_dev);
unsigned long scale_uv;
unsigned int vref;
int scale_uv;
switch (m) {
case 0: