From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: Zhang Changzhong <zhangchangzhong@huawei.com>
Cc: Taras Chornyi <tchornyi@marvell.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Oleksandr Mazur <oleksandr.mazur@plvision.eu>,
Yevhen Orlov <yevhen.orlov@plvision.eu>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net] net: marvell: prestera: add missing unregister_netdev() in prestera_port_create()
Date: Tue, 22 Nov 2022 13:27:04 +0100 [thread overview]
Message-ID: <Y3zAGJhQVEnzQhAH@boxer> (raw)
In-Reply-To: <1669115432-36841-1-git-send-email-zhangchangzhong@huawei.com>
On Tue, Nov 22, 2022 at 07:10:31PM +0800, Zhang Changzhong wrote:
> If prestera_port_sfp_bind() fails, unregister_netdev() should be called
> in error handling path.
>
> Compile tested only.
>
> Fixes: 52323ef75414 ("net: marvell: prestera: add phylink support")
> Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Makes sense and fixes commit is correct.
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
> ---
> drivers/net/ethernet/marvell/prestera/prestera_main.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/marvell/prestera/prestera_main.c b/drivers/net/ethernet/marvell/prestera/prestera_main.c
> index 24f9d60..47796e4 100644
> --- a/drivers/net/ethernet/marvell/prestera/prestera_main.c
> +++ b/drivers/net/ethernet/marvell/prestera/prestera_main.c
> @@ -746,6 +746,7 @@ static int prestera_port_create(struct prestera_switch *sw, u32 id)
> return 0;
>
> err_sfp_bind:
> + unregister_netdev(dev);
> err_register_netdev:
> prestera_port_list_del(port);
> err_port_init:
> --
> 2.9.5
>
next prev parent reply other threads:[~2022-11-22 12:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-22 11:10 [PATCH net] net: marvell: prestera: add missing unregister_netdev() in prestera_port_create() Zhang Changzhong
2022-11-22 12:27 ` Maciej Fijalkowski [this message]
2022-11-24 4:20 ` patchwork-bot+netdevbpf
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=Y3zAGJhQVEnzQhAH@boxer \
--to=maciej.fijalkowski@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oleksandr.mazur@plvision.eu \
--cc=pabeni@redhat.com \
--cc=tchornyi@marvell.com \
--cc=yevhen.orlov@plvision.eu \
--cc=zhangchangzhong@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.