On 12/11/16 18:19, Brian Masney wrote: > in_illuminance_lux_table_store assumes that an unsigned int is 32 bits. > Replace this with sizeof(value[1]). > > Signed-off-by: Brian Masney <[email protected]> Applied. > --- > drivers/staging/iio/light/tsl2583.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/iio/light/tsl2583.c > b/drivers/staging/iio/light/tsl2583.c > index fe9d777..78967dc 100644 > --- a/drivers/staging/iio/light/tsl2583.c > +++ b/drivers/staging/iio/light/tsl2583.c > @@ -582,7 +582,7 @@ static ssize_t in_illuminance_lux_table_store(struct > device *dev, > > /* Zero out the table */ > memset(tsl2583_device_lux, 0, sizeof(tsl2583_device_lux)); > - memcpy(tsl2583_device_lux, &value[1], value[0] * 4); > + memcpy(tsl2583_device_lux, &value[1], value[0] * sizeof(value[1])); > > ret = len; > >
- Re: [PATCH v4 16/26] staging: iio: tsl2583: change t... Jonathan Cameron
- [PATCH v4 19/26] staging: iio: tsl2583: move from a globa... Brian Masney
- Re: [PATCH v4 19/26] staging: iio: tsl2583: move fro... Jonathan Cameron
- [PATCH v4 15/26] staging: iio: tsl2583: moved code block ... Brian Masney
- Re: [PATCH v4 15/26] staging: iio: tsl2583: moved co... Jonathan Cameron
- [PATCH v4 13/26] staging: iio: tsl2583: fix multiline com... Brian Masney
- Re: [PATCH v4 13/26] staging: iio: tsl2583: fix mult... Jonathan Cameron
- [PATCH v4 02/26] staging: iio: tsl2583: remove unnecessar... Brian Masney
- Re: [PATCH v4 02/26] staging: iio: tsl2583: remove u... Jonathan Cameron
- [PATCH v4 18/26] staging: iio: tsl2583: don't assume an u... Brian Masney
- Re: [PATCH v4 18/26] staging: iio: tsl2583: don't as... Jonathan Cameron
- [PATCH v4 01/26] staging: iio: tsl2583: check if chip is ... Brian Masney
- Re: [PATCH v4 01/26] staging: iio: tsl2583: check if... Jonathan Cameron
- [PATCH v4 08/26] staging: iio: tsl2583: unify function an... Brian Masney
- Re: [PATCH v4 08/26] staging: iio: tsl2583: unify fu... Jonathan Cameron
- [PATCH v4 14/26] staging: iio: tsl2583: updated code comm... Brian Masney
- Re: [PATCH v4 14/26] staging: iio: tsl2583: updated ... Jonathan Cameron
- [PATCH v4 17/26] staging: iio: tsl2583: remove unnecessar... Brian Masney
- Re: [PATCH v4 17/26] staging: iio: tsl2583: remove u... Jonathan Cameron
- [PATCH v4 10/26] staging: iio: tsl2583: fix comparison be... Brian Masney
- Re: [PATCH v4 10/26] staging: iio: tsl2583: fix comp... Jonathan Cameron

