RE: [patch] iio: light: signedness bug in stk3310_write_raw()

Breana, Tiberiu A
2015-05-27T09:10:26Z

> From: Dan Carpenter [mailto:dan.carpenter@oracle.com]
> Sent: Wednesday, May 27, 2015 11:24 AM
> To: Jonathan Cameron
> Cc: Hartmut Knaack; Lars-Peter Clausen; Peter Meerwald; Breana, Tiberiu A=
;
> linux-iio@vger.kernel.org; kernel-janitors@vger.kernel.org
> Subject: [patch] iio: light: signedness bug in stk3310_write_raw()
>=20
> "index" needs to be signed for the error handling to work.
>=20

Thanks for this. I don't know how it slipped by our reviews.

Reviewed-by: Tiberiu Breana <tiberiu.a.breana@intel.com>

> Fixes: be9e6229d676 ('iio: light: Add support for Sensortek STK3310')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>=20
> diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c in=
dex
> 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 =3D iio_priv(indio_dev);
>=20
> switch (mask) {