Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 57d0557dfa49 ("platform/x86: thinkpad_acpi: Add Thinkpad Edge E531 fan support")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/platform-driver-x86/f99e558d-c62a-41eb-93b3-cf00c016d907@stanley.mountain/
Signed-off-by: Matthias Fetzer <kontakt@matthias-fetzer.de>
Link: https://lore.kernel.org/r/20240903172756.19235-1-kontakt@matthias-fetzer.de
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>

authored by

Matthias Fetzer and committed by
Hans de Goede
3a1fb526 bb9c2e54

+1 -1
+1 -1
drivers/platform/x86/thinkpad_acpi.c
··· 8318 8318 8319 8319 static int fan_set_enable(void) 8320 8320 { 8321 - u8 s; 8321 + u8 s = 0; 8322 8322 int rc; 8323 8323 8324 8324 if (!fan_control_allowed)