Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4429158pxu; Mon, 12 Oct 2020 20:09:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGgzRcnZveqR8+8y+0JSAx9qP76a3V9UyVGodp8MlKbPOAJ1WBsygRStYDzSgBKFPPUEEY X-Received: by 2002:a50:ef12:: with SMTP id m18mr17848077eds.313.1602558581046; Mon, 12 Oct 2020 20:09:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602558581; cv=none; d=google.com; s=arc-20160816; b=DimDEi/sgbu8FNHUzssIo4fWWZWkwhMsURoH0goGpsrJWiXpy9ZbuBynrgXKha4cjc SYKRwgclY8PBlIgFu6ldnIgQv/Q4EyT2Cvih+m/ACTXaLZfF2nVL/sxXgMXUs/U3Y8uU lgwi2SsYpNvNC7GlXhhfnwOFHcK6SFqI9fHbj+ILNSw6dlT/+e55Lf8gk5cSz4m+AZ26 rC4BazuYjNqtW7nVndxSGiFnv6tPkfBzGGQaB51kJASOLiL09tXEkMF8mepk0lyksHKD ak1U+0HcSXXxLY4AXzWLJ1AQp3z2M1P0klbmY3YNqFrrYGIcEsn8+GZnaY0FDac/InWc Fjvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nl1DUxYxnMQ56IqBHM7FHAXcfvqlGBVYp234QoOfqGw=; b=inhBGl/a5iTlVJtNzdejb59BIpiS2TeUCcsFgb0LdJpog/p2Iy0ILSiLg7TvjakCAJ MaPORk9Mwwo1TVkK0HLyQsZSYPjmL4YyPj1BQ9d+cwmk1bzx33uuQo4++UNnKb2wzIVT fCpUH72BwKwBuc9zbIth3YsM8iwwNle+3BPojoAA7PcN8fPXSWVbLyEPRmS4iXRcGA2+ bL0Nyg354UofU1SH7/CxuvjftLr9EjJtS/l/yMiYHNzNtdpqxQ3Dzu2CATn3bPxfVBC2 d4lyxXY+wx+sm4FGfWJNo2Pf1KmsBXH+PkdkebqO9XiK7cUmGHwEJ2et8j6vnpDbE4R2 3a1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vTl5xbgG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w27si14121058edl.279.2020.10.12.20.09.01; Mon, 12 Oct 2020 20:09:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vTl5xbgG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391055AbgJLOG1 (ORCPT + 99 others); Mon, 12 Oct 2020 10:06:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:36760 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730230AbgJLNe1 (ORCPT ); Mon, 12 Oct 2020 09:34:27 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 016422222F; Mon, 12 Oct 2020 13:34:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602509656; bh=/ZHgex/KMwOUGfYEdwGUNIyuAGKFvjjDlQKu+Q02E1c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vTl5xbgGsKW6UdWbYKg+Shi0/7D1hwlZ9xoThCC4X3uwIsejRd3JVAW7eVZuQVJNb rZ0N2xsf81xjrFWoEmhpi76XORF2NbJVYwQCGYtRnSZsBLHglvXrSESkiGE748EFjO GnjLAT24V43JatmpS5HwrKLe5oYctn4IMIqYakUA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tom Rix , Hans de Goede , mark gross , Andy Shevchenko Subject: [PATCH 4.9 29/54] platform/x86: thinkpad_acpi: initialize tp_nvram_state variable Date: Mon, 12 Oct 2020 15:26:51 +0200 Message-Id: <20201012132630.941946479@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201012132629.585664421@linuxfoundation.org> References: <20201012132629.585664421@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tom Rix commit 5f38b06db8af3ed6c2fc1b427504ca56fae2eacc upstream. clang static analysis flags this represenative problem thinkpad_acpi.c:2523:7: warning: Branch condition evaluates to a garbage value if (!oldn->mute || ^~~~~~~~~~~ In hotkey_kthread() mute is conditionally set by hotkey_read_nvram() but unconditionally checked by hotkey_compare_and_issue_event(). So the tp_nvram_state variable s[2] needs to be initialized. Fixes: 01e88f25985d ("ACPI: thinkpad-acpi: add CMOS NVRAM polling for hot keys (v9)") Signed-off-by: Tom Rix Reviewed-by: Hans de Goede Acked-by: mark gross Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman --- drivers/platform/x86/thinkpad_acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -2476,7 +2476,7 @@ static void hotkey_compare_and_issue_eve */ static int hotkey_kthread(void *data) { - struct tp_nvram_state s[2]; + struct tp_nvram_state s[2] = { 0 }; u32 poll_mask, event_mask; unsigned int si, so; unsigned long t;