mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] platform/x86: thinkpad_acpi: Fix uninitialized symbol
@ 2024-09-03 17:27 Matthias Fetzer
  2024-09-04 18:31 ` Hans de Goede
  0 siblings, 1 reply; 2+ messages in thread
From: Matthias Fetzer @ 2024-09-03 17:27 UTC (permalink / raw)
  To: hmh, hdegoede, ilpo.jarvinen, ibm-acpi-devel,
	platform-driver-x86, linux-kernel
  Cc: Matthias Fetzer

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.

Signed-off-by: Matthias Fetzer <kontakt@matthias-fetzer.de>
---
 drivers/platform/x86/thinkpad_acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)
-- 
2.46.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-09-04 18:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-03 17:27 [PATCH] platform/x86: thinkpad_acpi: Fix uninitialized symbol Matthias Fetzer
2024-09-04 18:31 ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®