linux/drivers/staging/iio
Colin Ian King 13ffe9a26d staging: iio: ade7759: fix signed extension bug on shift of a u8
The current shift of st->rx[2] left shifts a u8 24 bits left,
promotes the integer to a an int and then to a unsigned u64. If
the top bit of st->rx[2] is set then we end up with all the upper
bits being set to 1. Fix this by casting st->rx[2] to a u64 before
the 24 bit left shift.

Detected by CoverityScan CID#144940 ("Unintended sign extension")

Fixes: 2919fa54ef ("staging: iio: meter: new driver for ADE7759 devices")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-09-30 21:13:34 +01:00
..
Documentation staging: iio: tsl2583: move out of staging 2016-11-13 13:07:33 +00:00
accel Staging: iio: accel: adis16203: fixed a brace coding style issue 2017-04-14 16:13:34 +01:00
adc staging: iio: ad7192: Fix - use the dedicated reset function avoiding dma from stack. 2017-09-24 16:58:37 +01:00
addac staging: iio: Add blank lines after function declarations 2017-03-23 19:43:34 +00:00
cdc staging: iio: ad7152: Fix deadlock in ad7152_write_raw_samp_freq() 2017-05-28 15:45:46 +01:00
frequency iio: ad9834 convert symbolic permissions to octal 2017-05-01 00:59:21 +01:00
gyro iio: gyro: adis16060: Change the name of function. 2017-04-02 09:10:32 +01:00
impedance-analyzer staging: iio: ad5933: Protect DIRECT mode using claim/release helpers 2017-04-14 15:09:06 +01:00
light staging: iio: tsl2x7x: check return value from tsl2x7x_invoke_change() 2017-07-09 18:46:25 +01:00
meter staging: iio: ade7759: fix signed extension bug on shift of a u8 2017-09-30 21:13:34 +01:00
resolver staging:iio:resolver:ad2s1210 fix negative IIO_ANGL_VEL read 2017-07-15 12:41:54 +01:00
trigger iio: trigger: free trigger resource correctly 2017-01-22 16:14:21 +00:00
Kconfig iio: hmc5843: Move hmc5843 out of staging 2016-02-24 20:40:39 +00:00
Makefile iio: hmc5843: Move hmc5843 out of staging 2016-02-24 20:40:39 +00:00
TODO staging:iio:TODO drop outdated entries in this todo. 2016-10-23 19:33:40 +01:00