android_kernel_xiaomi_sm8450/drivers/iio/accel
Harshit Mogalapalli 09ca779ac0 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:40:17 +01:00
..
adis16201.c iio:imu:adis: Move exports into IIO_ADISLIB namespace 2023-01-14 10:15:58 +01:00
adis16209.c iio:imu:adis: Move exports into IIO_ADISLIB namespace 2023-01-14 10:15:58 +01:00
adxl345_core.c
adxl345_i2c.c
adxl345_spi.c
adxl345.h
adxl372_i2c.c
adxl372_spi.c
adxl372.c
adxl372.h
bma180.c iio:accel:bma180: rearrange iio trigger get and register 2022-06-29 08:59:51 +02:00
bma220_spi.c iio: accel: bma220: Fix buffer alignment in iio_push_to_buffers_with_timestamp() 2021-07-14 16:56:34 +02:00
bma400_core.c iio: accel: bma400: Reordering of header files 2022-08-21 15:15:54 +02:00
bma400_i2c.c
bma400_spi.c
bma400.h iio: accel: bma400: Fix the scale min and max macro values 2022-08-21 15:15:54 +02:00
bmc150-accel-core.c iio: Fix error handling for PM 2022-03-02 11:42:53 +01: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-15 17:22:17 +01:00
Kconfig
kxcjk-1013.c iio: Fix error handling for PM 2022-03-02 11:42:53 +01:00
kxsd9-i2c.c
kxsd9-spi.c
kxsd9.c iio: kxsd9: Don't return error code in trigger handler 2021-12-14 11:32:44 +01:00
kxsd9.h
Makefile
mc3230.c
mma7455_core.c
mma7455_i2c.c
mma7455_spi.c
mma7455.h
mma7660.c
mma8452.c iio: accel: mma8452: ignore the return value of reset operation 2022-06-29 08:59:52 +02:00
mma9551_core.c iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_config_word() 2023-03-11 16:40:17 +01:00
mma9551_core.h
mma9551.c iio: Fix error handling for PM 2022-03-02 11:42:53 +01:00
mma9553.c iio: Fix error handling for PM 2022-03-02 11:42:53 +01:00
mxc4005.c iio:accel:mxc4005: rearrange iio trigger get and register 2022-06-29 08:59:52 +02:00
mxc6255.c
sca3000.c
ssp_accel_sensor.c
st_accel_buffer.c
st_accel_core.c iio: st_sensors: Call st_sensors_power_enable() from bus drivers 2021-11-18 14:04:13 +01:00
st_accel_i2c.c iio: st_sensors: disable regulators after device unregistration 2021-11-18 14:04:13 +01:00
st_accel_spi.c iio: st_sensors: disable regulators after device unregistration 2021-11-18 14:04:13 +01:00
st_accel.h
stk8ba50.c iio: accel: stk8ba50: Fix buffer alignment in iio_push_to_buffers_with_timestamp() 2021-07-14 16:56:35 +02:00
stk8312.c iio: accel: stk8312: Fix buffer alignment in iio_push_to_buffers_with_timestamp() 2021-07-14 16:56:35 +02:00