Skip to content

Commit 6229ce9

Browse files
committed
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 <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent d4b938a commit 6229ce9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/platform/x86/thinkpad_acpi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10344,7 +10344,7 @@ static int dytc_profile_set(struct platform_profile_handler *pprof,
1034410344
static void dytc_profile_refresh(void)
1034510345
{
1034610346
enum platform_profile_option profile;
10347-
int output, err;
10347+
int output, err = 0;
1034810348
int perfmode;
1034910349

1035010350
mutex_lock(&dytc_mutex);

0 commit comments

Comments
 (0)