WSL2-Linux-Kernel/drivers/iio/accel
Harshit Mogalapalli 587b48b18a 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:57:35 +01:00
..
Kconfig
Makefile
adis16201.c
adis16209.c
adxl345.h
adxl345_core.c
adxl345_i2c.c
adxl345_spi.c
adxl372.c
adxl372.h
adxl372_i2c.c
adxl372_spi.c
bma180.c
bma220_spi.c
bma400.h
bma400_core.c
bma400_i2c.c
bma400_spi.c
bmc150-accel-core.c
bmc150-accel-i2c.c
bmc150-accel-spi.c
bmc150-accel.h
bmi088-accel-core.c
bmi088-accel-spi.c
bmi088-accel.h
cros_ec_accel_legacy.c
da280.c
da311.c
dmard06.c
dmard09.c
dmard10.c
fxls8962af-core.c
fxls8962af-i2c.c
fxls8962af-spi.c
fxls8962af.h
hid-sensor-accel-3d.c iio: hid: fix the retval in accel_3d_capture_sample 2023-02-09 11:26:42 +01:00
kxcjk-1013.c
kxsd9-i2c.c
kxsd9-spi.c
kxsd9.c
kxsd9.h
mc3230.c
mma7455.h
mma7455_core.c
mma7455_i2c.c
mma7455_spi.c
mma7660.c
mma8452.c
mma9551.c
mma9551_core.c iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_config_word() 2023-03-11 13:57:35 +01:00
mma9551_core.h
mma9553.c
mxc4005.c
mxc6255.c
sca3000.c
sca3300.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
stk8312.c