aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Fetzer <[email protected]>2024-09-03 19:27:56 +0200
committerHans de Goede <[email protected]>2024-09-04 20:30:31 +0200
commit3a1fb526c2482b2f61c9813e9e14fcdab4ffa390 (patch)
tree112280cbe655c559f3805a819ef038a930440071
parentbb9c2e5492a88e255305d0dfae33e34f0e8bbec6 (diff)
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 <[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]>
-rw-r--r--drivers/platform/x86/thinkpad_acpi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 8f7053920884..4c1b0553f872 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -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)