Skip to content
Commit a1c9f508 authored by Kees Cook's avatar Kees Cook Committed by Jonathan Cameron
Browse files

iio: pressure: dlhl60d: Initialize empty DLH bytes

3 bytes were being read but 4 were being written. Explicitly initialize
the unused bytes to 0 and refactor the loop to use direct array
indexing, which appears to silence a Clang false positive warning[1].

Indent improvement included for readability of the fixed code.

Link: https://github.com/ClangBuiltLinux/linux/issues/2000

 [1]
Fixes: ac78c6aa ("iio: pressure: Add driver for DLH pressure sensors")
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240223172936.it.875-kees@kernel.org


Cc: <Stable@vger.kerenl.org>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent daec424c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment