Commit 3a1fb526 authored by Matthias Fetzer's avatar Matthias Fetzer Committed by Hans de Goede

platform/x86: thinkpad_acpi: Fix uninitialized symbol 's' warning

When the TPACPI_FAN_WR_ACPI_FANW branch is taken s stays uninitialized
and would be later used in a debug print.

Since the registers are always set to the same two static values inside the
branch s is initialized to 0.

Fixes: 57d0557d ("platform/x86: thinkpad_acpi: Add Thinkpad Edge E531 fan support")
Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/platform-driver-x86/f99e558d-c62a-41eb-93b3-cf00c016d907@stanley.mountain/Signed-off-by: default avatarMatthias Fetzer <kontakt@matthias-fetzer.de>
Link: https://lore.kernel.org/r/20240903172756.19235-1-kontakt@matthias-fetzer.deReviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent bb9c2e54
......@@ -8318,7 +8318,7 @@ static int fan_set_level_safe(int level)
static int fan_set_enable(void)
{
u8 s;
u8 s = 0;
int rc;
if (!fan_control_allowed)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment