Commit ed6e75c7 authored by Dan Carpenter's avatar Dan Carpenter Committed by Jonathan Cameron

iio: light: signedness bug in stk3310_write_raw()

"index" needs to be signed for the error handling to work.

Fixes: be9e6229 ('iio: light: Add support for Sensortek STK3310')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 5517547b
...@@ -370,7 +370,7 @@ static int stk3310_write_raw(struct iio_dev *indio_dev, ...@@ -370,7 +370,7 @@ static int stk3310_write_raw(struct iio_dev *indio_dev,
int val, int val2, long mask) int val, int val2, long mask)
{ {
int ret; int ret;
unsigned int index; int index;
struct stk3310_data *data = iio_priv(indio_dev); struct stk3310_data *data = iio_priv(indio_dev);
switch (mask) { switch (mask) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment