summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorSanjay Chitroda <sanjayembeddedse@gmail.com>2026-05-05 23:16:31 +0530
committerJonathan Cameron <jic23@kernel.org>2026-05-31 10:59:42 +0100
commit5bdff291d20c31b365d9ddfe9c426fbfb41da5bb (patch)
tree446889ebb51b15a6bea7c441b51aced49654a6de /tools/perf/scripts/python
parent97d30982aa5ae2b2f1778fdc91cc8f6e26e15453 (diff)
iio: accel: mma8452: handle I2C read error(s) in mma8452_read()
Currently, If i2c_smbus_read_i2c_block_data() fails but mma8452_set_runtime_pm_state() succeeds, mma8452_read() returns 0. As a result, the caller mma8452_read_raw() assumes the read was successful and proceeds to use a buffer containing uninitialized stack memory. Add proper checking of the I2C read return value and propagate errors to the caller. Fixes: 96c0cb2bbfe0 ("iio: mma8452: add support for runtime power management") Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions