iio: accel: bma400: Fix memory leak in bma400_get_steps_reg()
When regmap_bulk_read() fails, it does not free steps_raw, which will cause a memory leak issue, this patch fixes it. Fixes: d221de60 ("iio: accel: bma400: Add separate channel for step counter") Signed-off-by: NDong Chenchen <dongchenchen2@huawei.com> Reviewed-by: NJagath Jog J <jagathjog1996@gmail.com> Link: https://lore.kernel.org/r/20221110010726.235601-1-dongchenchen2@huawei.com Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
Showing
想要评论请 注册 或 登录