mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Guangshuo Li <lgs201920130244@gmail.com>
Cc: Siddharth Vadapalli <s-vadapalli@ti.com>,
	Roger Quadros <rogerq@kernel.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Kevin Hao <haokexin@gmail.com>,
	Alexander Sverdlin <alexander.sverdlin@gmail.com>,
	Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
	Daniel Zahka <daniel.zahka@gmail.com>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Murali Karicheri <m-karicheri2@ti.com>,
	Grygorii Strashko <grygorii.strashko@ti.com>,
	linux-omap@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: cpsw_new: unregister devlink on port registration failure
Date: Wed, 3 Jun 2026 18:10:31 +0200	[thread overview]
Message-ID: <b02f66eb-8b5b-461c-b990-30e6a5ceca56@lunn.ch> (raw)
In-Reply-To: <20260603140742.1398659-1-lgs201920130244@gmail.com>

On Wed, Jun 03, 2026 at 10:07:42PM +0800, Guangshuo Li wrote:
> cpsw_probe() registers devlink before registering the CPSW ports.
> 
> If cpsw_register_ports() fails, the error path only unregisters the
> notifiers and then releases the lower level resources. It does not undo
> the successful cpsw_register_devlink() call, leaving the devlink instance
> and its parameters registered after probe has failed.
> 
> Add a devlink cleanup label for the path where devlink registration has
> already succeeded, and use it when port registration fails.
> 
> Fixes: ed3525eda4c4 ("net: ethernet: ti: introduce cpsw switchdev based driver part 1 - dual-emac")
> Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>

https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html

Please set the subject line correctly.

https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html

Does this bother people? If not, net-next, and no Fixes tag please.


    Andrew

---
pw-bot: cr

  parent reply	other threads:[~2026-06-03 16:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-03 14:07 Guangshuo Li
2026-06-03 14:43 ` Loktionov, Aleksandr
2026-06-03 16:10 ` Andrew Lunn [this message]
2026-06-03 16:58 ` Sverdlin, Alexander
2026-06-04  4:22   ` Guangshuo Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b02f66eb-8b5b-461c-b990-30e6a5ceca56@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=aleksandr.loktionov@intel.com \
    --cc=alexander.sverdlin@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=daniel.zahka@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=grygorii.strashko@ti.com \
    --cc=haokexin@gmail.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=kuba@kernel.org \
    --cc=lgs201920130244@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=m-karicheri2@ti.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rogerq@kernel.org \
    --cc=s-vadapalli@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®