summaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2015-05-27 11:24:25 +0300
committerJonathan Cameron <jic23@kernel.org>2015-06-01 16:57:23 +0100
commited6e75c7dc5627c7251002936577052ae73ac2db (patch)
treea10873bc95a0b45a1d060152a5a5d2881e41b1b4 /drivers/iio
parent5517547bf44731621338c1a4047196a49c790719 (diff)
downloadop-kernel-dev-ed6e75c7dc5627c7251002936577052ae73ac2db.zip
op-kernel-dev-ed6e75c7dc5627c7251002936577052ae73ac2db.tar.gz
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c
index e79b9d8..fee4297 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) {
OpenPOWER on IntegriCloud