Harshit Mogalapalli 64a6815873 iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_config_word()
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>
2023-01-28 17:40:17 +00:00
..
2023-01-21 17:58:59 +00:00
2022-06-04 14:04:27 -07:00
2022-11-27 15:05:05 +01:00
2023-01-28 16:22:46 +00:00
2021-11-17 17:51:35 +00:00
2023-01-21 17:35:23 +00:00
2021-12-16 17:29:46 +00:00
2021-12-16 17:29:46 +00:00