Skip to content
Commit 6ee2a705 authored by Jonathan Cameron's avatar Jonathan Cameron
Browse files

iio: accel: bma400: Fix smatch warning based on use of unintialized value.



Only specific bits in this value are ever used and those are initialized,
but that is complex to reason about in a checker. Hence, initialize
the value to zero and avoid the complexity.

Smatch warning:
drivers/iio/accel/bma400_core.c:1287 bma400_tap_event_en()
error: uninitialized symbol 'field_value'.

Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Cc: Jagath Jog J <jagathjog1996@gmail.com>
Cc: Alexander Potapenko <glider@google.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: default avatarJagath Jog J <jagathjog1996@gmail.com>
Fixes: 961db2da ("iio: accel: bma400: Add support for single and double tap events")
Link: https://lore.kernel.org/r/20220917131401.2815486-1-jic23@kernel.org


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