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 775FC47012B; Tue, 21 Jul 2026 19:41:04 +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=1784662865; cv=none; b=ZJ3nvGOYB5r0velx5eyXYaA+ryT0b4WuXV1JJ86eNddr34AWGAtrnYiFdxwChQE7Z61GuE3r8lXj3qoB462Uq5iLZlxbbccg+C9lRQRnozDLvvu1aFzfhDtQsIPIJnDToA5e7CcOv32AQvOM8tIkxxhko3KYCrSs/k9/cJAJX/c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784662865; c=relaxed/simple; bh=BTJHMbkabhkp+Iq/XE6AsjQPOvp+JpKNp5uhAWVBTrk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=V035fG4Fu+LIcIXjFFoyMe9a9bXXvoq0SlSwemWPnxrW0+tmHLf5bktA4IOU7rk3GfVVqMgZgZVkOyK820hz75OJCDBH1ZGVjcsrY98q5aCc/Of24gd/hRWRxZBDGuYiSz4n539ThMtQzrJ/OAvqqsmFGu9R7YRQYcy0QR+nZqA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ukuVdqZH; 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="ukuVdqZH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DBB801F00A3A; Tue, 21 Jul 2026 19:41:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784662864; bh=qFDgjS+mXI0P5/k6RRapKWReomi7vJepsGVccdOTOPs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ukuVdqZHXENerXR7GgyUETnob/CKGSzKGtuiS87hTq2VnbgtOA2j/kuvvnh1+Kv9W LXi3Dhgo21MUpNFNoXv9Y1yT89+Awzt9JJf3Oq3Z7Pmq2zYxUDP1ARJkcnOLFT2NEw 0tE85fUosqnFEkR5fVRuHmnLUpDsR78g4zqtz4QY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Ruoyu Wang , Maxime Chevallier , Elad Nachman , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.12 0607/1276] net: marvell: prestera: initialize err in prestera_port_sfp_bind Date: Tue, 21 Jul 2026 17:17:30 +0200 Message-ID: <20260721152459.692710613@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152446.065700225@linuxfoundation.org> References: <20260721152446.065700225@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: Ruoyu Wang [ Upstream commit 62b01f72d93c7bc8fde3b2e5b5f783eca5f53324 ] prestera_port_sfp_bind() returns err after walking the ports node. If no child node matches the port's front-panel id, err is never assigned. Initialize err to 0 because absence of a matching optional port device tree node is not an error. In that case no phylink is created and port creation should continue with port->phy_link left NULL. Errors from malformed matched nodes and phylink_create() still propagate. Fixes: 52323ef75414 ("net: marvell: prestera: add phylink support") Signed-off-by: Ruoyu Wang Reviewed-by: Maxime Chevallier Acked-by: Elad Nachman Link: https://patch.msgid.link/20260617193228.1653582-1-ruoyuw560@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/marvell/prestera/prestera_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/marvell/prestera/prestera_main.c b/drivers/net/ethernet/marvell/prestera/prestera_main.c index 22ca6ee9665eb4..3f7cc04a873b2e 100644 --- a/drivers/net/ethernet/marvell/prestera/prestera_main.c +++ b/drivers/net/ethernet/marvell/prestera/prestera_main.c @@ -372,7 +372,7 @@ static int prestera_port_sfp_bind(struct prestera_port *port) struct device_node *ports, *node; struct fwnode_handle *fwnode; struct phylink *phy_link; - int err; + int err = 0; if (!sw->np) return 0; -- 2.53.0