diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-05-27 11:24:25 +0300 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-06-01 18:57:23 +0300 |
commit | ed6e75c7dc5627c7251002936577052ae73ac2db (patch) | |
tree | a10873bc95a0b45a1d060152a5a5d2881e41b1b4 /drivers/iio | |
parent | 5517547bf44731621338c1a4047196a49c790719 (diff) | |
download | linux-ed6e75c7dc5627c7251002936577052ae73ac2db.tar.xz |
iio: light: signedness bug in stk3310_write_raw()
"index" needs to be signed for the error handling to work.
Fixes: be9e6229d676 ('iio: light: Add support for Sensortek STK3310')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/light/stk3310.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c index e79b9d89b024..fee4297d7c8f 100644 --- a/drivers/iio/light/stk3310.c +++ b/drivers/iio/light/stk3310.c @@ -370,7 +370,7 @@ static int stk3310_write_raw(struct iio_dev *indio_dev, int val, int val2, long mask) { int ret; - unsigned int index; + int index; struct stk3310_data *data = iio_priv(indio_dev); switch (mask) { |