From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 DDC3E13B58A; Sun, 1 Mar 2026 02:03:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772330610; cv=none; b=WSNK3SIs7weczGsfT7Ez3dzBYeLsrQMPKl4wgpl6YxXegPnkCkL/5l4vcDosJLFiZCTPf2mh3J+rj30JdWsY4JqPNuzmwZVAwCM10IFNMLx2pM1aRsDRunovESgp46Z9Wa2SU+6IZvIMpsm1M4Yn0A6keWk+WAUUYldatGktYtE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772330610; c=relaxed/simple; bh=wzh8wsO6irvPerOdWNHU4LEZ0BTcdQRSIsP2TnanVnk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=uwqamBpMhVGkgDYSTvLGPfenNVtPaz+VhH4llgtyzP3bckRvE+viX76fYux1YKB/v9e6Pyht1tCly5FI3yVzX+qZ8DGfvVOyH2OUNL5cozMUOyXtDbBj3w/vQO6XQSGLyxESwUZhHcByBTqkJ5urrirwJFbUKO2lBroQAQQhLPQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WXJRRdyM; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WXJRRdyM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C8A61C19421; Sun, 1 Mar 2026 02:03:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772330610; bh=wzh8wsO6irvPerOdWNHU4LEZ0BTcdQRSIsP2TnanVnk=; h=From:To:Cc:Subject:Date:From; b=WXJRRdyM0XM9a2sVwhW2WC46+VUN4xQuyvvZHhxrphxuYLCrSoDQ/uBsy6X8tNxRE 8ALPlDJi66FKlPWCOFeyfTwn/3TPTCMZupkLfWUI5hHp03JAp+j+wjBLPdSvlDzeDD tiMA4wlKVs+xZl1m9wWy+GCz6SgdnDTUysFd1sXAhj9O4RODbYgLN2VYuGGgEGbMBl Yopt+JhGpiIIOt8Kptj8eZdA2Pdi3ZPOwTte3VFIMQ8EhdTPIfVJutEkQ67+7WHkiM DuVe2ElPOTBrn8PlLLUV1fhiAwS3yLJGO0fsJUPJHVb2B93CZzxdRZTjhuqp+2rENv UxiAGmZ2doBkg== From: Sasha Levin To: stable@vger.kernel.org, haokexin@gmail.com Cc: Alexander Sverdlin , Jakub Kicinski , linux-omap@vger.kernel.org, netdev@vger.kernel.org Subject: FAILED: Patch "net: cpsw_new: Fix unnecessary netdev unregistration in cpsw_probe() error path" failed to apply to 5.10-stable tree Date: Sat, 28 Feb 2026 21:03:28 -0500 Message-ID: <20260301020328.1731548-1-sashal@kernel.org> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Hint: ignore X-stable: review Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.10-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . Thanks, Sasha ------------------ original commit in Linus's tree ------------------ >From 62db84b7efa63b78aed9fdbdae90f198771be94c Mon Sep 17 00:00:00 2001 From: Kevin Hao Date: Thu, 5 Feb 2026 10:47:02 +0800 Subject: [PATCH] net: cpsw_new: Fix unnecessary netdev unregistration in cpsw_probe() error path The current error handling in cpsw_probe() has two issues: - cpsw_unregister_ports() may be called before cpsw_register_ports() has been executed. - cpsw_unregister_ports() is already invoked within cpsw_register_ports() in case of a register_netdev() failure, but the error path would call it again. Fixes: ed3525eda4c4 ("net: ethernet: ti: introduce cpsw switchdev based driver part 1 - dual-emac") Signed-off-by: Kevin Hao Cc: stable@vger.kernel.org Reviewed-by: Alexander Sverdlin Link: https://patch.msgid.link/20260205-cpsw-error-path-v1-1-6e58bae6b299@gmail.com Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/ti/cpsw_new.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw_new.c b/drivers/net/ethernet/ti/cpsw_new.c index 21af0a10626aa..b9fc31eb06134 100644 --- a/drivers/net/ethernet/ti/cpsw_new.c +++ b/drivers/net/ethernet/ti/cpsw_new.c @@ -2003,7 +2003,7 @@ static int cpsw_probe(struct platform_device *pdev) /* setup netdevs */ ret = cpsw_create_ports(cpsw); if (ret) - goto clean_unregister_netdev; + goto clean_cpts; /* Grab RX and TX IRQs. Note that we also have RX_THRESHOLD and * MISC IRQs which are always kept disabled with this driver so @@ -2017,14 +2017,14 @@ static int cpsw_probe(struct platform_device *pdev) 0, dev_name(dev), cpsw); if (ret < 0) { dev_err(dev, "error attaching irq (%d)\n", ret); - goto clean_unregister_netdev; + goto clean_cpts; } ret = devm_request_irq(dev, cpsw->irqs_table[1], cpsw_tx_interrupt, 0, dev_name(dev), cpsw); if (ret < 0) { dev_err(dev, "error attaching irq (%d)\n", ret); - goto clean_unregister_netdev; + goto clean_cpts; } if (!cpsw->cpts) @@ -2034,7 +2034,7 @@ static int cpsw_probe(struct platform_device *pdev) 0, dev_name(&pdev->dev), cpsw); if (ret < 0) { dev_err(dev, "error attaching misc irq (%d)\n", ret); - goto clean_unregister_netdev; + goto clean_cpts; } /* Enable misc CPTS evnt_pend IRQ */ @@ -2043,7 +2043,7 @@ static int cpsw_probe(struct platform_device *pdev) skip_cpts: ret = cpsw_register_notifiers(cpsw); if (ret) - goto clean_unregister_netdev; + goto clean_cpts; ret = cpsw_register_devlink(cpsw); if (ret) @@ -2065,8 +2065,6 @@ static int cpsw_probe(struct platform_device *pdev) clean_unregister_notifiers: cpsw_unregister_notifiers(cpsw); -clean_unregister_netdev: - cpsw_unregister_ports(cpsw); clean_cpts: cpts_release(cpsw->cpts); cpdma_ctlr_destroy(cpsw->dma); -- 2.51.0