Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4272458pxu; Mon, 12 Oct 2020 14:29:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHOioyfMINk1n27m/cHriQR1K5pnZUJqImq/Rq38m5ro/67WuJGS3jnwAYJCHR8EiIYcP+ X-Received: by 2002:aa7:c3cf:: with SMTP id l15mr14583743edr.314.1602538162953; Mon, 12 Oct 2020 14:29:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602538162; cv=none; d=google.com; s=arc-20160816; b=H4Gw0uq8ICb3+3Z10lkJ0Y8lv6Y+2xF4jCQDRFLYJkw2JfILQLPNS8qIMHGhbyCnht zoTiEOa8e1u6oQgSoVfNoI7OUwwn12QCLB9kTPWNqBrD/sjVoDytAPaFz1Avw81Phuqv 6yVO1Lksx06gFEREPmupd9pJ+r9Rw2+MF4vtuIJLaWoav8iYavglCKA0EHtq0YFERsO4 VVQHOsncblYF5e0NzVgzQYSMKBKxne9tSQYY1ABk7s9HopNnVSBWYFFGCG7/818O/o5D N5d31o1DYFSkdUfoiGMG8l0JEX/il38ckk/fPeWGnz9mOVry7iZAsDKi+K05wh8xqkek yXFg== 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=5VEdi7ZUQkE+SjHcWlMzQXZG/5rHjKelG9CyU8KvChI=; b=Fv19yWtcC4ItXBfVxpR4ana1XXBZckxoEcKVqTnMUKCTqbRFVmxM8H2a8snUjDWiyQ HUKF6aoi374RMaHgM9+B1sy24CmTRgCk8jaCLtK1j/1QHLT3TDSaT+yQrw7d8206oGYJ ro4gOA3D0fewtdlmz+5LH+PWG9QOBv5hwSCvsagn8Ns/yby5pZsSb5hE+YBESE3wl5hq PWf0a5LP8r56DLOfziw9KbWRQSHjzP1IVFQ5Xvq2VsLVRkgUgy4TuB/x4fifozkRRVet T+0txvlaFkyz7ejWCa8LF4rYFQt6J3kNhLkZ+UoLM/2V87bNzTCtmDvNq4DRaAN3ayz3 dW9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TOUFJLtx; 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 j3si13203930ejb.156.2020.10.12.14.29.00; Mon, 12 Oct 2020 14:29:22 -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=TOUFJLtx; 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 S2388807AbgJLNkR (ORCPT + 99 others); Mon, 12 Oct 2020 09:40:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:43390 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731397AbgJLNjc (ORCPT ); Mon, 12 Oct 2020 09:39:32 -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 88CD222202; Mon, 12 Oct 2020 13:39:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602509972; bh=jbCXXIh2OVAA1Vuli1eU34PPJbt5Awzg0o0AQb51dNk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TOUFJLtxF9uJZXD8VwcGbc+OJPdUdv2FPdmOxYHod0BAmV/8F+7U09I56nf2vwl1Q BdwRQTzV6ZCqtR9fx5fv+G0rAY3Y/ovgB7WuXy/goCK/K2KhOWDtzV2r+w2gNbKCpy FwDB9h4vCqufgd32c/lb3A/daKNkyyR/Px/H3SNw= 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.19 09/49] platform/x86: thinkpad_acpi: initialize tp_nvram_state variable Date: Mon, 12 Oct 2020 15:26:55 +0200 Message-Id: <20201012132629.869799403@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201012132629.469542486@linuxfoundation.org> References: <20201012132629.469542486@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 @@ -2597,7 +2597,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;