platform/x86: thinkpad_acpi: Fix uninitialized symbol 's' warning
authorMatthias Fetzer <kontakt@matthias-fetzer.de>
Tue, 3 Sep 2024 17:27:56 +0000 (19:27 +0200)
committerHans de Goede <hdegoede@redhat.com>
Wed, 4 Sep 2024 18:30:31 +0000 (20:30 +0200)
commit3a1fb526c2482b2f61c9813e9e14fcdab4ffa390
tree112280cbe655c559f3805a819ef038a930440071
parentbb9c2e5492a88e255305d0dfae33e34f0e8bbec6
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>
drivers/platform/x86/thinkpad_acpi.c