From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 07358325495; Fri, 7 Aug 2026 14:45:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786113930; cv=none; b=MovI0EPuf6xnckqcwVBf5sjjyM5QfP+Eb2P9uoymXe/lfVLUf4LAQ/EjbXreXagUDPq3ena+Uxnx3lf5dGXcYq03J9rxsyZRmtCMV/YLsz+FkVMkI75Me/KZ7FfAcMTwXyh4Mt/L5hpC6CmD0TUn0iRs4Fj18XrVKKVqoyud8tE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786113930; c=relaxed/simple; bh=91cwdhb6QKMzHdH5bKAGr27nlOKIfBvo5i4iIUWJp6Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rReQaLBuIc239WvWKJm8cSnVTw1Czb4iMh+UxQcGMgVyvK35rAQfui3Mla+QB26jRLJH2vXKw+5L7nk16gTCvp657taHaHWp18ERSyavNxeFuhK6wPhgJRcKgjAjKaIms/nsx8Keo/f4QSCOEUZCvRVGBUPqDJ+Q9w6ignrTTqE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KICTv8y0; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="KICTv8y0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29D8D1F000E9; Fri, 7 Aug 2026 14:45:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1786113928; bh=y3RvMlG+VhyGDK8e2Ea+vR7fQTSBECJokxDbUsk4xfI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=KICTv8y0bYXgFxhLnlNHol+5HRWqfuG085e9Vru4P+MZtiveloCEJJzxxZn7h6Trk 8UXzI15yrwYPMpXD1o1bgiVwetFa4Dz/5FwuJDZKHiiHRzXf8sYfIhAwtCRMT0AHuz ZmR4NaSE60o9g3GB7vy5LpuTcgaolCCecAEiqY88= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Thorsten Blum , "Ritesh Harjani (IBM)" , Madhavan Srinivasan , Sasha Levin Subject: [PATCH 6.12 085/337] powerpc/boot: Fix simpleboot CPU node lookup check Date: Fri, 7 Aug 2026 16:34:48 +0200 Message-ID: <20260807143420.355917334@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260807143418.516897842@linuxfoundation.org> References: <20260807143418.516897842@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Thorsten Blum [ Upstream commit c824ab65685bb119c6c6a3a200b3428c72862d5a ] fdt_node_offset_by_prop_value() returns a negative error code on failure - fix the check accordingly. Fixes: d2477b5cc8ca ("[POWERPC] bootwrapper: Add a firmware-independent simpleboot target.") Signed-off-by: Thorsten Blum Reviewed-by: Ritesh Harjani (IBM) Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20260702211554.56923-4-thorsten.blum@linux.dev Signed-off-by: Sasha Levin --- arch/powerpc/boot/simpleboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/boot/simpleboot.c b/arch/powerpc/boot/simpleboot.c index c80691d83880b..27591df41e9e8 100644 --- a/arch/powerpc/boot/simpleboot.c +++ b/arch/powerpc/boot/simpleboot.c @@ -68,7 +68,7 @@ void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, /* finally, setup the timebase */ node = fdt_node_offset_by_prop_value(_dtb_start, -1, "device_type", "cpu", sizeof("cpu")); - if (!node) + if (node < 0) fatal("Cannot find cpu node\n"); timebase = fdt_getprop(_dtb_start, node, "timebase-frequency", &size); if (timebase && (size == 4)) -- 2.53.0