linux_dsm_epyc7002/drivers/iio
Arnd Bergmann 32cb7d27e6 iio: maxim_thermocouple: detect invalid storage size in read()
As found by gcc -Wmaybe-uninitialized, having a storage_bytes value other
than 2 or 4 will result in undefined behavior:

drivers/iio/temperature/maxim_thermocouple.c: In function 'maxim_thermocouple_read':
drivers/iio/temperature/maxim_thermocouple.c:141:5: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]

This probably cannot happen, but returning -EINVAL here is appropriate
and makes gcc happy and the code more robust.

Fixes: 231147ee77 ("iio: maxim_thermocouple: Align 16 bit big endian value of raw reads")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-10-25 17:28:23 +01:00
..
accel staging:iio:accel:sca3000 Move out of staging. 2016-10-23 19:34:07 +01:00
adc iio: ti-adc0832: add triggered buffer support 2016-10-23 19:34:25 +01:00
amplifiers
buffer
chemical
common
counter iio: 104-quad-8: Add IIO support for the ACCES 104-QUAD-8 2016-10-01 17:06:21 +01:00
dac iio: dac: mcp4725: fix odd_ptr_err.cocci warnings 2016-10-23 19:34:27 +01:00
dummy
frequency
gyro iio: gyro: Add driver for the MPU-3050 gyroscope 2016-10-25 17:24:05 +01:00
health
humidity iio: humidity: hdc100x: add triggered buffer support for HDC100X 2016-10-23 19:34:25 +01:00
imu iio: bmi160_core: Fix sparse warning due to incorrect type in assignment 2016-10-23 19:33:44 +01:00
light iio: light: ltr501: claim direct mode during raw writes 2016-10-23 19:34:08 +01:00
magnetometer iio: magnetometer: ak8974: small endianness fixes 2016-10-03 21:30:00 +01:00
orientation
potentiometer
potentiostat iio: potentiostat: add LMP91000 support 2016-09-27 20:33:03 +01:00
pressure First round of IIO new device support, features and cleanups for the 4.10 cycle. 2016-10-24 11:34:22 +02:00
proximity iio: proximity: pulsedlight-lidar-lite-v2: cleanup power management 2016-10-23 19:34:26 +01:00
temperature iio: maxim_thermocouple: detect invalid storage size in read() 2016-10-25 17:28:23 +01:00
trigger
iio_core_trigger.h
iio_core.h
industrialio-buffer.c iio: Use kmalloc_array() in iio_scan_mask_set() 2016-09-24 16:35:24 +01:00
industrialio-configfs.c
industrialio-core.c iio: Implement counter channel type and info constants 2016-10-01 17:06:02 +01:00
industrialio-event.c
industrialio-sw-device.c
industrialio-sw-trigger.c
industrialio-trigger.c iio:trigger: Add helper function to verify that a trigger belongs to the same device 2016-09-27 20:32:55 +01:00
industrialio-triggered-event.c
inkern.c iio: inkern: add iio_read_channel_offset helper 2016-09-27 20:33:02 +01:00
Kconfig iio: 104-quad-8: Add IIO support for the ACCES 104-QUAD-8 2016-10-01 17:06:21 +01:00
Makefile iio: 104-quad-8: Add IIO support for the ACCES 104-QUAD-8 2016-10-01 17:06:21 +01:00