mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
net: marvell: prestera: add missing unregister_netdev() in prestera_port_create()
[ Upstream commit9a234a2a08
] If prestera_port_sfp_bind() fails, unregister_netdev() should be called in error handling path. Compile tested only. Fixes:52323ef754
("net: marvell: prestera: add phylink support") Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com> Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Link: https://lore.kernel.org/r/1669115432-36841-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
7f70bc140c
commit
9b0fdadbe6
1 changed files with 1 additions and 0 deletions
|
@ -730,6 +730,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:
|
||||
|
|
Loading…
Reference in a new issue