From mboxrd@z Thu Jan 1 00:00:00 1970 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 04236C19F2D for ; Tue, 9 Aug 2022 05:47:35 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4M22CV1ZJJz3c2s for ; Tue, 9 Aug 2022 15:47:34 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=russell.cc header.i=@russell.cc header.a=rsa-sha256 header.s=fm2 header.b=Q+EsuHn+; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=AsnIzQ5W; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=russell.cc (client-ip=64.147.123.25; helo=wout2-smtp.messagingengine.com; envelope-from=ruscur@russell.cc; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=russell.cc header.i=@russell.cc header.a=rsa-sha256 header.s=fm2 header.b=Q+EsuHn+; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=AsnIzQ5W; dkim-atps=neutral Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4M22Bh1XYZz2x9J for ; Tue, 9 Aug 2022 15:46:51 +1000 (AEST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 7958C320070D; Tue, 9 Aug 2022 01:46:46 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 09 Aug 2022 01:46:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=russell.cc; h=cc :cc:content-transfer-encoding:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm2; t=1660024005; x=1660110405; bh=OHrf2naIHgHrBiy9zKszz6ED1 entwenO6Sen8acphM4=; b=Q+EsuHn+3kZtMY+w5ZISp4Jc7Z9475kMwMmguDKyl d528QgljuwabAF0mhREEv/zJHetXnb3RwJcjt9/NMENsf+2wjFopkc/n/KnRIZF/ 35GZ/t4Z9hn9a6TWhnsHARy6NohJsZcQGo4gxGBHSNZ/rwKzLCIFrbhE+ReZpzfN jc6LXv7dHbzGpmdoT4Pji5Uqj8KzTYe0cMAEJZvjrpf97ZG5E6/su+Hewtpj//+Z i5qFq+ZaEiablePixFO812l8CPh2kDmoJrPNOumnOTq13i8iS+9lQiE1BqgcXbYS K9UVkzn7KEw3Wh04gtI0Qn5ttCHbzKEwcbhxQzYZhnfcw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1660024005; x=1660110405; bh=OHrf2naIHgHrBiy9zKszz6ED1entwenO6Se n8acphM4=; b=AsnIzQ5WBtT0ulF+VB63P4f+CxknGapxDG4Zpgzc1z8nPKdBri7 pH/v3kSVdE32uX1NCuNYi6acj1DLavDMglpQL1k9ZdgzBQjvqEpSa5CPVZ2wkJi0 vrjfOl9Tt1hxgLYEkqeFBPsz5Z0O2z+ihfpj+wlC5zjE5Q8VOfhK6USHkIsOQ2Dz 6RSmrCFqggnnBpbAJWXgCtcO1pWd6ZbQiW6y7yd7gSxfOCoflqLqRc1WUg8yJM5C 0U4ozioDslwH8Xt5x1ex/7+4yg3ODf3nBgsJI35jLar+cDtCLQiGH8W1/yH9NCGY xagUG/i32i9cLZXKluttYASMYWU/sdGRy7A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdefledguddttdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecufghrlhcuvffnffculdduhedmnecujfgurhephf fvvefufffkofgggfestdekredtredttdenucfhrhhomheptfhushhsvghllhcuvehurhhr vgihuceorhhushgtuhhrsehruhhsshgvlhhlrdgttgeqnecuggftrfgrthhtvghrnhepff dvfefgudfgfedvgeffudekteeiheelfefggeegjedtveduleehkeeiieefvdejnecuffho mhgrihhnpehoiihlrggsshdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpehruhhstghurhesrhhushhsvghllhdrtggt X-ME-Proxy: Feedback-ID: i4421424f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 9 Aug 2022 01:46:43 -0400 (EDT) From: Russell Currey To: linuxppc-dev@lists.ozlabs.org, aik@ozlabs.ru Subject: [PATCH] powerpc/kexec: Fix build failure from uninitialised variable Date: Tue, 9 Aug 2022 15:45:30 +1000 Message-Id: <20220809054530.907974-1-ruscur@russell.cc> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nathan@kernel.org, Russell Currey Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" clang 14 won't build because ret is uninitialised and can be returned if both prop and fdtprop are NULL. Fixes: b1fc44eaa9ba ("pseries/iommu/ddw: Fix kdump to work in absence of ibm,dma-window") Signed-off-by: Russell Currey --- Not sure what should be returned here, EINVAL seemed reasonable for a passed property not existing. Also, damn it Alexey, I mentioned this in my review: http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20220616075901.835871-1-aik@ozlabs.ru/ Consider yourself lucky I'm no longer your dictator (if you don't already) arch/powerpc/kexec/file_load_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kexec/file_load_64.c b/arch/powerpc/kexec/file_load_64.c index 683462e4556b..8fa2995e6fc7 100644 --- a/arch/powerpc/kexec/file_load_64.c +++ b/arch/powerpc/kexec/file_load_64.c @@ -1043,7 +1043,7 @@ static int copy_property(void *fdt, int node_offset, const struct device_node *d const char *propname) { const void *prop, *fdtprop; - int len = 0, fdtlen = 0, ret; + int len = 0, fdtlen = 0, ret = -EINVAL; prop = of_get_property(dn, propname, &len); fdtprop = fdt_getprop(fdt, node_offset, propname, &fdtlen); -- 2.37.1