Skip to content

Commit

Permalink
platform/x86: thinkpad_acpi: Fix compiler warning about uninitialized…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
Hans de Goede committed Mar 9, 2022
1 parent d4b938a commit 6229ce9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/platform/x86/thinkpad_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -10344,7 +10344,7 @@ static int dytc_profile_set(struct platform_profile_handler *pprof,
static void dytc_profile_refresh(void)
{
enum platform_profile_option profile;
int output, err;
int output, err = 0;
int perfmode;

mutex_lock(&dytc_mutex);
Expand Down

0 comments on commit 6229ce9

Please sign in to comment.