Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9121353pxu; Mon, 28 Dec 2020 07:09:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJwUmKjOLJvPHvF4chekjWCxuYClMk3b+E2jH/D7vdRYSXv/RDdoyBMYRVtw4RMC1bb7oabJ X-Received: by 2002:aa7:c749:: with SMTP id c9mr43154848eds.3.1609168163389; Mon, 28 Dec 2020 07:09:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609168163; cv=none; d=google.com; s=arc-20160816; b=wc2DFK5siTvkjC9LNqChnqGkeUdxrZxNM97ZdgbXNPIcS1rHtJNk+GNmZ9VDG8qbyv pVBfHpkZabRx9DrggWP6P5fD3YrDChg80bRwSdkjg60KESXphn8wSImu3Ee+UobuJxfd XT0OiBhZgvMMaqh2MmcNRUbEm+quvTIqAJIvbAL3NhMytOt7n7cqE1GD6gRj2kC4bgxK 9l+BM/8F7AqkMSXfx/AyBPvoM8pG9VSe1Yt/rzvxB0kPJaFG9ZQdDCmluPmzPphzOC0H 9QeOir04owM1zQVdTSNsEFyGqIONA3VF9Z/tuinqRBv9o1nisekzyDJoqhoN9Is6D8hs NIHA== 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=6NGWlQfGQVR+NE5DGUpuZWFXPN7yBzc11EFYKXTVRHA=; b=nDKrZnjOYCQhnQmZc1KzqfM3cHYf+I9jEZvyVvh9UFwkPE5GZSGCGK5LoVdZxR1Sq9 BnONYo0MK51VhBDE17p72cdfEhaR6k2rWN+RwS5Z6HLe/93tgTHnaauRvJFsW8SiBDNr 2ce47MlW6jfX25/mC/vhIqa7YvFFgoJEERykT2Ga6dRGhO/TJGTEUF7IMjChd7PE5tjp us8zI2yw1yUL7O0dia/3TtDr3wqLlhYA9p7A5MtyVYxCxbJeRZvE7jGLIuFtJI9Jk9GQ B+xtlYyExiFU1+6tDVusLGrIaWVclCgsZcJnbWhaS1v5bfOF0J48DGvRtKcfFSalH6iK uCmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=s58S1XlS; 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=pass (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 n14si20028472edq.574.2020.12.28.07.09.00; Mon, 28 Dec 2020 07:09:23 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=s58S1XlS; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2438865AbgL1OJq (ORCPT + 99 others); Mon, 28 Dec 2020 09:09:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:44166 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438847AbgL1OJm (ORCPT ); Mon, 28 Dec 2020 09:09:42 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 25BCA206D4; Mon, 28 Dec 2020 14:09:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164541; bh=12phwOgW9S+W836a/ph7ZBnx44NUwADRXaH5JUoPinU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s58S1XlSRuzj5xiNzyeMtdPJwVkKgCvlGq7oeKOSGsfHjIQge27+wKljIHRXXjX8G bjviGOjbF2nQwfTEt7PN0hJYJGoAlNX8r0QDXHJmmQ35agFB4rjq/GxFNy0GUyOjH4 phZGfWF56EvtndMHRIsgcnrfAapDsONtO/4Y86eU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sibi Sankar , Tom Rix , Bjorn Andersson , Sasha Levin Subject: [PATCH 5.10 181/717] soc: qcom: initialize local variable Date: Mon, 28 Dec 2020 13:42:59 +0100 Message-Id: <20201228125029.634313066@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@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 [ Upstream commit a161ffe4b877721d8917e18e70461d255a090f19 ] clang static analysis reports this problem pdr_interface.c:596:6: warning: Branch condition evaluates to a garbage value if (!req.service_path[0]) ^~~~~~~~~~~~~~~~~~~~ This check that req.service_path was set in an earlier loop. However req is a stack variable and its initial value is undefined. So initialize req to 0. Fixes: fbe639b44a82 ("soc: qcom: Introduce Protection Domain Restart helpers") Reviewed-by: Sibi Sankar Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20200819184637.15648-1-trix@redhat.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin --- drivers/soc/qcom/pdr_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/qcom/pdr_interface.c b/drivers/soc/qcom/pdr_interface.c index 088dc99f77f3f..f63135c09667f 100644 --- a/drivers/soc/qcom/pdr_interface.c +++ b/drivers/soc/qcom/pdr_interface.c @@ -569,7 +569,7 @@ EXPORT_SYMBOL(pdr_add_lookup); int pdr_restart_pd(struct pdr_handle *pdr, struct pdr_service *pds) { struct servreg_restart_pd_resp resp; - struct servreg_restart_pd_req req; + struct servreg_restart_pd_req req = { 0 }; struct sockaddr_qrtr addr; struct pdr_service *tmp; struct qmi_txn txn; -- 2.27.0