diff options
| author | Denis Arefev <[email protected]> | 2025-04-03 12:26:01 +0000 |
|---|---|---|
| committer | Ilpo Järvinen <[email protected]> | 2025-04-11 09:52:57 +0000 |
| commit | 6c683c6887e4addcd6bd1ddce08cafccb0a21e32 (patch) | |
| tree | dbe130410066e2e8ef378efba49b9fe921224c9b /net/unix/af_unix.c | |
| parent | platform/x86: intel_pmc_ipc: add option to build without ACPI (diff) | |
| download | kernel-6c683c6887e4addcd6bd1ddce08cafccb0a21e32.tar.gz kernel-6c683c6887e4addcd6bd1ddce08cafccb0a21e32.zip | |
asus-laptop: Fix an uninitialized variable
The value returned by acpi_evaluate_integer() is not checked,
but the result is not always successful, so it is necessary to
add a check of the returned value.
If the result remains negative during three iterations of the loop,
then the uninitialized variable 'val' will be used in the clamp_val()
macro, so it must be initialized with the current value of the 'curr'
variable.
In this case, the algorithm should be less noisy.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: b23910c2194e ("asus-laptop: Pegatron Lucid accelerometer")
Cc: [email protected]
Signed-off-by: Denis Arefev <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Ilpo Järvinen <[email protected]>
Signed-off-by: Ilpo Järvinen <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions
