Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4DD6AC433F5 for ; Wed, 9 Mar 2022 17:11:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237169AbiCIRMV (ORCPT ); Wed, 9 Mar 2022 12:12:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237038AbiCIRMM (ORCPT ); Wed, 9 Mar 2022 12:12:12 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 540D61107E3 for ; Wed, 9 Mar 2022 09:05:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646845551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=+J3wAVFQV/+mI884qNi3x2vZcyCdFlESE6+D1OYFafs=; b=OIIfkgAGwDNBIFE2gibAebuAdHCiDscNuGEmodVq3Usz64s2nc0snsOqQUPOy0kNZAcu79 DUXoP1D58JdbleGqmz1/d9n5L5fIIUrbwD/JRoAE5PgVEXOGklZAqlchBz2+po3msz1wpS ufPpX5Og+0KEhtRgidKtFB9BQljEqdY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-25-fuPp2GH9NGCULBAkBET6WA-1; Wed, 09 Mar 2022 12:05:46 -0500 X-MC-Unique: fuPp2GH9NGCULBAkBET6WA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DE7751006AA6; Wed, 9 Mar 2022 17:05:44 +0000 (UTC) Received: from localhost.localdomain (unknown [10.39.192.35]) by smtp.corp.redhat.com (Postfix) with ESMTP id 90C7C380B; Wed, 9 Mar 2022 17:05:43 +0000 (UTC) From: Hans de Goede To: Mark Gross , Andy Shevchenko , Mark Pearson Cc: Hans de Goede , platform-driver-x86@vger.kernel.org, kernel test robot Subject: [PATCH 1/2] platform/x86: thinkpad_acpi: Fix compiler warning about uninitialized err variable Date: Wed, 9 Mar 2022 18:05:31 +0100 Message-Id: <20220309170532.343384-1-hdegoede@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org 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 Signed-off-by: Hans de Goede --- 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 cb8f52be8253..7016c7fc3440 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -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); -- 2.35.1