android_kernel_xiaomi_sm8350/drivers/iio/accel
Harshit Mogalapalli f5b76a8166 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:44:15 +01:00
..
adis16201.c iio:accel:adis16201: Fix wrong axis assignment that prevents loading 2021-05-14 09:44:12 +02:00
adis16209.c
adxl345_core.c Merge remote-tracking branch 'remotes/origin/tmp-f686d9f' into msm-lahaina 2019-07-01 17:41:24 -07:00
adxl345_i2c.c
adxl345_spi.c
adxl345.h
adxl372_i2c.c iio: adxl372: Add support for I2C communication 2018-09-08 15:54:38 +01:00
adxl372_spi.c
adxl372.c iio: accel: adxl372: Set iio_chan BE 2020-03-25 08:25:53 +01:00
adxl372.h iio: adxl372: Add support for I2C communication 2018-09-08 15:54:38 +01:00
bma180.c
bma220_spi.c
bmc150-accel-core.c iio: Fix error handling for PM 2022-03-02 11:41:12 +01:00
bmc150-accel-i2c.c Merge remote-tracking branch 'remotes/origin/tmp-f686d9f' into msm-lahaina 2019-07-01 17:41:24 -07:00
bmc150-accel-spi.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
bmc150-accel.h
cros_ec_accel_legacy.c
da280.c
da311.c
dmard06.c
dmard09.c Merge remote-tracking branch 'remotes/origin/tmp-f686d9f' into msm-lahaina 2019-07-01 17:41:24 -07:00
dmard10.c
hid-sensor-accel-3d.c
Kconfig
kxcjk-1013.c iio: Fix error handling for PM 2022-03-02 11:41:12 +01:00
kxsd9-i2c.c
kxsd9-spi.c
kxsd9.c iio: kxsd9: Don't return error code in trigger handler 2021-12-14 14:49:05 +01:00
kxsd9.h
Makefile
mc3230.c Merge remote-tracking branch 'remotes/origin/tmp-f686d9f' into msm-lahaina 2019-07-01 17:41:24 -07:00
mma7455_core.c
mma7455_i2c.c Merge remote-tracking branch 'remotes/origin/tmp-f686d9f' into msm-lahaina 2019-07-01 17:41:24 -07:00
mma7455_spi.c
mma7455.h
mma7660.c Merge remote-tracking branch 'remotes/origin/tmp-f686d9f' into msm-lahaina 2019-07-01 17:41:24 -07:00
mma8452.c
mma9551_core.c iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_config_word() 2023-03-11 16:44:15 +01:00
mma9551_core.h
mma9551.c iio: Fix error handling for PM 2022-03-02 11:41:12 +01:00
mma9553.c
mxc4005.c
mxc6255.c Merge remote-tracking branch 'remotes/origin/tmp-f686d9f' into msm-lahaina 2019-07-01 17:41:24 -07:00
sca3000.c
ssp_accel_sensor.c
st_accel_buffer.c iio:st_sensors: remove buffer allocation at each buffer enable 2019-08-11 09:26:04 +01:00
st_accel_core.c
st_accel_i2c.c iio: st_sensors: remap SMO8840 to LIS2DH12 2020-03-25 08:25:53 +01:00
st_accel_spi.c iio: move 3-wire spi initialization to st_sensors_spi 2019-07-27 22:52:06 +01:00
st_accel.h
stk8ba50.c
stk8312.c