acrn-kernel/drivers/iio/accel
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
..
Kconfig iio: add MEMSensing MSA311 3-axis accelerometer driver 2022-08-30 18:35:38 +01:00
Makefile iio: add MEMSensing MSA311 3-axis accelerometer driver 2022-08-30 18:35:38 +01:00
adis16201.c
adis16209.c
adxl313.h drivers: iio: accel: adxl312 and adxl314 support 2022-09-21 18:42:53 +01:00
adxl313_core.c drivers: iio: accel: adxl312 and adxl314 support 2022-09-21 18:42:53 +01:00
adxl313_i2c.c drivers: iio: accel: adxl312 and adxl314 support 2022-09-21 18:42:53 +01:00
adxl313_spi.c drivers: iio: accel: adxl312 and adxl314 support 2022-09-21 18:42:53 +01:00
adxl345.h
adxl345_core.c iio: accel: adxl345: use HZ macro from units.h 2022-08-28 16:57:37 +01:00
adxl345_i2c.c
adxl345_spi.c
adxl355.h
adxl355_core.c iio: accel: adxl355: Fix alignment for DMA safety 2022-06-14 11:53:11 +01:00
adxl355_i2c.c
adxl355_spi.c
adxl367.c iio: adxl367: Fix unsafe buffer attributes 2022-10-17 08:51:26 +01:00
adxl367.h
adxl367_i2c.c
adxl367_spi.c iio: accel: adxl367: Fix alignment for DMA safety 2022-06-14 11:53:11 +01:00
adxl372.c iio: adxl372: Fix unsafe buffer attributes 2022-10-17 08:51:26 +01:00
adxl372.h
adxl372_i2c.c
adxl372_spi.c
bma180.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
bma220_spi.c iio: accel: bma220: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-07-18 18:48:17 +01:00
bma400.h iio: accel: bma400: Add support for single and double tap events 2022-09-05 18:08:42 +01:00
bma400_core.c iio: accel: bma400: Fix memory leak in bma400_get_steps_reg() 2022-11-12 17:49:22 +00:00
bma400_i2c.c
bma400_spi.c
bmc150-accel-core.c iio: bmc150-accel-core: Fix unsafe buffer attributes 2022-10-17 08:51:26 +01:00
bmc150-accel-i2c.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
bmc150-accel-spi.c
bmc150-accel.h
bmi088-accel-core.c iio: accel: bmi088: Use EXPORT_NS_GPL_RUNTIME_DEV_PM_OPS() and pm_ptr() 2022-09-21 18:42:57 +01:00
bmi088-accel-spi.c iio: accel: bmi088: Use EXPORT_NS_GPL_RUNTIME_DEV_PM_OPS() and pm_ptr() 2022-09-21 18:42:57 +01:00
bmi088-accel.h iio: accel: bmi088: Add support for bmi090l accel 2022-06-11 14:35:28 +01:00
cros_ec_accel_legacy.c iio: cros: Register FIFO callback after sensor is registered 2022-07-18 18:29:13 +01:00
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:28:17 +01:00
kxcjk-1013.c Char/Misc and other driver changes for 6.1-rc1 2022-10-08 08:56:37 -07:00
kxsd9-i2c.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
kxsd9-spi.c iio:accel:kxsd9: Switch from CONFIG_PM guards to pm_ptr() etc 2022-06-15 22:07:09 +01:00
kxsd9.c iio:accel:kxsd9: Switch from CONFIG_PM guards to pm_ptr() etc 2022-06-15 22:07:09 +01:00
kxsd9.h
mc3230.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
mma7455.h
mma7455_core.c
mma7455_i2c.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
mma7455_spi.c
mma7660.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
mma8452.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
mma9551.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
mma9551_core.c iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_config_word() 2023-03-11 13:55:35 +01:00
mma9551_core.h
mma9553.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
msa311.c iio: add MEMSensing MSA311 3-axis accelerometer driver 2022-08-30 18:35:38 +01:00
mxc4005.c iio:accel:mxc4005: rearrange iio trigger get and register 2022-06-19 17:22:48 +01:00
mxc6255.c
sca3000.c iio: accel: sca3000: Fix alignment for DMA safety 2022-06-14 11:53:12 +01:00
sca3300.c iio: accel: sca3300: Extend the trigger buffer from 16 to 32 bytes 2022-07-19 09:38:53 +01:00
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 i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
stk8312.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00