aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/thinkpad_acpi.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2022-03-09 18:05:31 +0100
committerHans de Goede <hdegoede@redhat.com>2022-03-09 18:17:57 +0100
commit6229ce9c36384c7adce09f06a3a1897faa5f2c1a (patch)
tree0b081c0d3de9aab437119be25eb693a6647cb3c5 /drivers/platform/x86/thinkpad_acpi.c
parentplatform/x86: thinkpad_acpi: clean up dytc profile convert (diff)
downloadlinux-dev-6229ce9c36384c7adce09f06a3a1897faa5f2c1a.tar.xz
linux-dev-6229ce9c36384c7adce09f06a3a1897faa5f2c1a.zip
platform/x86: thinkpad_acpi: Fix compiler warning about uninitialized err variable
err is always set because if we get here then dytc_profile_available is always one of DYTC_FUNCMODE_MMC or DYTC_FUNCMODE_PSC, but the compiler cannot now that, so initialize err to 0 to avoid a compiler warning about err being uninitialized. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20220309170532.343384-1-hdegoede@redhat.com
Diffstat (limited to 'drivers/platform/x86/thinkpad_acpi.c')
-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 cb8f52be8253..7016c7fc3440 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -10344,7 +10344,7 @@ unlock:
static void dytc_profile_refresh(void)
{
enum platform_profile_option profile;
- int output, err;
+ int output, err = 0;
int perfmode;
mutex_lock(&dytc_mutex);