Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4341286pxu; Mon, 12 Oct 2020 16:51:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxp7HkUGs7lcbbXw4Kx9czW5KEElL5GA1m5CaEPo7ge4m80lPy7F+EO7bGUU2OIsupSgROQ X-Received: by 2002:a50:ccc4:: with SMTP id b4mr16700302edj.250.1602546686265; Mon, 12 Oct 2020 16:51:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602546686; cv=none; d=google.com; s=arc-20160816; b=fIc37cpbwAFZzJlBNpq/srNRxWcoQLhOhlp1hvqqSwvJFs6AMeoagebJk/BcqF4WN+ /HI/X5cI+PIbs89SKAGTqUu7D+gg/OH/dQcdykQ8qumBj0G6fOMdNjhmEClCqfvd8VKt xIhRKEgY0L7eoR5MF1HLSyQrvRdvwVXW02SQTi/JR5nn5lGgwMuIoXpIn+EIr+kM8jgN dxlaAdQpKSNcvNy+ua5FA7CaV/hRxdYJqah1RCIbSJQqGUPN9NA/84txIpHw8DoFti+o m8fUJe/9OW2ue0LcXHzRxCMSYLvuRC7nYTz6Dz+553toOAwYxfKNZ7k4vgVMJRIV3Dnf +vgQ== 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=H3x2VTrAgEwL13MMWvIe9GLEAcU5J5rRcw13JNG9uxo=; b=PNnxyTNlH6p21rP5uCZBzKxUQaXJNrMJGAztZImCIAMUdOnUS7nDwsL+BcYPhr3CJy 0Lc8RhbBUKyi1hxIQUMYZSuJ7FRf/RmQQ3b69Jd/BYkIF7vigHeXrtMum+Uqs01ZiiYJ OOOQEGxpYVXyIz9sxsrhaxHh1BnEt0jmp40zfFBXNDsj/Xr4lu51atmxRAuPI35ocTjM rLvok//1t1/VSiDgSMnXRfFK8PoVMXeFOIBzXvCuZO8Wpf1bNHRBlQtWMgxCWSUAvYoh 7X/2E8GCIrVj4qbcN1AGd24q5dzob32GL175k2N9zxESdVlM19GVI/z2d0FYMn5zVaKC cxbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=clwr09MD; 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 f4si13756659ejt.278.2020.10.12.16.51.03; Mon, 12 Oct 2020 16:51:26 -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=clwr09MD; 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 S2389247AbgJLNpg (ORCPT + 99 others); Mon, 12 Oct 2020 09:45:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:46220 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731308AbgJLNmD (ORCPT ); Mon, 12 Oct 2020 09:42:03 -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 2BB142222A; Mon, 12 Oct 2020 13:41:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602510115; bh=UPT/492Fo6AnLtq6TBQhjo2qb15iLndaLUEJeTs8NUg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=clwr09MDzIDKE2mWfJruuLBKfLaj5tQoCt3Hi8ptSLfCpqtOYqa1RlHlXbJBxJAho CJO6+YlW/6cglXPeXKtGHskHOR09NQBFSYvbFABlNH8m7nZa9zE3tjKdxF8Sh47tfv rRnA7TVEx+fdNDfOU0f4nMg+BUBTHRdJadg2p5JI= 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 5.4 16/85] platform/x86: thinkpad_acpi: initialize tp_nvram_state variable Date: Mon, 12 Oct 2020 15:26:39 +0200 Message-Id: <20201012132633.639346798@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201012132632.846779148@linuxfoundation.org> References: <20201012132632.846779148@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 @@ -2587,7 +2587,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;