mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 21:21:09 -04:00
net: marvell: prestera: add missing unregister_netdev() in prestera_port_create()
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 <[email protected]>
Reviewed-by: Maciej Fijalkowski <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
This commit is contained in:
committed by
Jakub Kicinski
parent
a73e04c270
commit
9a234a2a08
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user