android_kernel_motorola_sm6225/drivers/iio/accel
Harshit Mogalapalli 48752d7758 iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_config_word()
[ Upstream commit 64a68158738ec8f520347144352f7a09bdb9e169 ]

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 16:32:01 +01:00
..
adis16201.c iio:accel:adis16201: Fix wrong axis assignment that prevents loading 2021-05-22 10:59:24 +02:00
adis16209.c
adxl345.h
adxl345_core.c
adxl345_i2c.c
adxl345_spi.c
bma180.c iio:accel:bma180: rearrange iio trigger get and register 2022-07-02 16:27:35 +02:00
bma220_spi.c iio: accel: bma220: Fix buffer alignment in iio_push_to_buffers_with_timestamp() 2021-07-20 16:15:53 +02:00
bmc150-accel-core.c iio:accel:bmc150-accel: Fix timestamp alignment and prevent data leak. 2020-09-17 13:45:27 +02:00
bmc150-accel-i2c.c
bmc150-accel-spi.c
bmc150-accel.h
cros_ec_accel_legacy.c
da280.c
da311.c
dmard06.c
dmard09.c
dmard10.c
hid-sensor-accel-3d.c iio: hid: fix the retval in accel_3d_capture_sample 2023-02-22 12:47:15 +01:00
Kconfig
kxcjk-1013.c iio: accel: kxcjk-1013: Fix possible memory leak in probe and remove 2021-12-14 10:18:10 +01:00
kxsd9-i2c.c
kxsd9-spi.c
kxsd9.c iio: kxsd9: Don't return error code in trigger handler 2021-12-14 10:18:09 +01:00
kxsd9.h
Makefile
mc3230.c
mma7455.h
mma7455_core.c iio:accel:mma7455: Fix timestamp alignment and prevent data leak. 2020-09-17 13:45:28 +02:00
mma7455_i2c.c
mma7455_spi.c
mma7660.c
mma8452.c iio: accel: mma8452: ignore the return value of reset operation 2022-07-02 16:27:35 +02:00
mma9551.c
mma9551_core.c iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_config_word() 2023-03-11 16:32:01 +01:00
mma9551_core.h
mma9553.c
mxc4005.c
mxc6255.c
sca3000.c
ssp_accel_sensor.c
st_accel.h
st_accel_buffer.c
st_accel_core.c
st_accel_i2c.c
st_accel_spi.c
stk8ba50.c iio: accel: stk8ba50: Fix buffer alignment in iio_push_to_buffers_with_timestamp() 2021-07-20 16:15:53 +02:00
stk8312.c iio: accel: stk8312: Fix buffer alignment in iio_push_to_buffers_with_timestamp() 2021-07-20 16:15:53 +02:00