summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/python_version.py
diff options
context:
space:
mode:
authorMatti Vaittinen <mazziesaccount@gmail.com>2026-09-02 11:49:05 +0300
committerJonathan Cameron <jonathan.cameron@oss.qualcomm.com>2026-09-06 22:36:00 +0100
commite65e128b51a37dd1a9056ac3d1705d805a5c8bb0 (patch)
treea805e34698b9c71e579917c0a72c912dc6e8ffa2 /tools/lib/python/kdoc/python_version.py
parent8065a6c02f629187131f3136bedb26f9080e3cca (diff)
downloadlinux-next-e65e128b51a37dd1a9056ac3d1705d805a5c8bb0.tar.gz
linux-next-e65e128b51a37dd1a9056ac3d1705d805a5c8bb0.zip
iio: accel: kionix-kx022a: Prevent memory leak and fix state
The driver allocates memory for samples at buffer enable path. If regmap operation fails in the kx022a_fifo_enable() at the buffer enable path, the allocated memory is never freed. Furthermore, the state information and previous hardware configuration(s) aren't undone, potentially leaving WMI interrupts and buffers enabled, or driver state flags wrong. Free the memory and revert the hardware configuration and state flags on error path. Fixes: e7123a4dfcd7 ("iio: accel: kionix-kx022a: Refactor driver and add chip_info structure") Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com> Cc: stable@vger.kernel.org Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions