Commit db9795a4 authored by Mikhail Lobanov's avatar Mikhail Lobanov Committed by Jonathan Cameron
Browse files

iio: accel: bma400: Fix uninitialized variable field_value in tap event handling.



In the current implementation, the local variable field_value is used
without prior initialization, which may lead to reading uninitialized
memory. Specifically, in the macro set_mask_bits, the initial
(potentially uninitialized) value of the buffer is copied into old__,
and a mask is applied to calculate new__. A similar issue was resolved in
commit 6ee2a705 ("iio: accel: bma400: Fix smatch warning based on use
of unintialized value.").

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 961db2da ("iio: accel: bma400: Add support for single and double tap events")
Signed-off-by: default avatarMikhail Lobanov <m.lobanov@rosalinux.ru>
Link: https://patch.msgid.link/20240910083624.27224-1-m.lobanov@rosalinux.ru


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 9852d85e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment