Skip to content

Commit 3a1fb52

Browse files
Matthias Fetzerjwrdegoede
authored andcommitted
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: 57d0557 ("platform/x86: thinkpad_acpi: Add Thinkpad Edge E531 fan support") Reported-by: Dan Carpenter <[email protected]> Closes: https://lore.kernel.org/platform-driver-x86/[email protected]/ Signed-off-by: Matthias Fetzer <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]>
1 parent bb9c2e5 commit 3a1fb52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/platform/x86/thinkpad_acpi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8318,7 +8318,7 @@ static int fan_set_level_safe(int level)
83188318

83198319
static int fan_set_enable(void)
83208320
{
8321-
u8 s;
8321+
u8 s = 0;
83228322
int rc;
83238323

83248324
if (!fan_control_allowed)

0 commit comments

Comments
 (0)