linux/drivers/iio
Harshit Mogalapalli f5a2a15da3 iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_config_word()
[ Upstream commit 64a6815873 ]

Smatch Warns:
drivers/iio/accel/mma9551_core.c:299
	mma9551_read_config_word() error: uninitialized symbol 'v'.

When (offset >= 1 << 12) is true mma9551_transfer() will return -EINVAL
without 'v' being initialized, so check for the error and return.

Note: No actual bug as caller checks the return value and does not
use the parameter in the problem case.

Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Link: https://lore.kernel.org/r/20230126153610.3586243-1-harshit.m.mogalapalli@oracle.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-11 13:55:35 +01:00
..
accel iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_config_word() 2023-03-11 13:55:35 +01:00
adc iio:adc:twl6030: Enable measurement of VAC 2023-02-09 11:28:26 +01:00
addac iio: addac: ad74413r: fix integer promotion bug in ad74413_get_input_current_offset() 2022-12-31 13:33:10 +01:00
afe
amplifiers
buffer
cdc
chemical
common
dac Char/Misc and other driver changes for 6.1-rc1 2022-10-08 08:56:37 -07:00
dummy
filter
frequency
gyro iio: hid: fix the retval in gyro_3d_capture_sample 2023-02-09 11:28:17 +01:00
health iio: health: afe4404: Fix oob read in afe4404_[read|write]_raw 2022-11-12 16:30:23 +00:00
humidity
imu iio: imu: fxos8700: fix MAGN sensor scale and unit 2023-02-09 11:28:19 +01:00
light iio: light: tsl2563: Do not hardcode interrupt trigger type 2023-03-10 09:33:29 +01:00
magnetometer Char/Misc and other driver changes for 6.1-rc1 2022-10-08 08:56:37 -07:00
multiplexer
orientation
position
potentiometer
potentiostat
pressure iio: pressure: ms5611: changed hardcoded SPI speed to value limited 2022-10-29 12:39:21 +01:00
proximity Char/Misc and other driver changes for 6.1-rc1 2022-10-08 08:56:37 -07:00
resolver
temperature iio: temperature: ltc2983: make bulk write buffer DMA-safe 2022-12-31 13:32:40 +01:00
test
trigger iio: trigger: sysfs: fix possible memory leak in iio_sysfs_trig_init() 2022-10-24 18:48:57 +01:00
iio_core_trigger.h
iio_core.h
industrialio-buffer.c
industrialio-configfs.c
industrialio-core.c
industrialio-event.c iio: fix memory leak in iio_device_register_eventset() 2022-12-31 13:33:10 +01:00
industrialio-sw-device.c
industrialio-sw-trigger.c iio: core: Fix entry not deleted when iio_register_sw_trigger_type() fails 2022-11-12 17:53:35 +00:00
industrialio-trigger.c
industrialio-triggered-event.c
inkern.c
Kconfig
Makefile
TODO