mlxsw: spectrum: Fix error path in mlxsw_sp_module_init()
In case of sp2 pci driver registration fail, fix the error path to
start with sp1 pci driver unregister.
Fixes: c3ab435466
("mlxsw: spectrum: Extend to support Spectrum-2 ASIC")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
abb48f8013
commit
28fe79000e
@ -6330,7 +6330,7 @@ static int __init mlxsw_sp_module_init(void)
|
||||
return 0;
|
||||
|
||||
err_sp2_pci_driver_register:
|
||||
mlxsw_pci_driver_unregister(&mlxsw_sp2_pci_driver);
|
||||
mlxsw_pci_driver_unregister(&mlxsw_sp1_pci_driver);
|
||||
err_sp1_pci_driver_register:
|
||||
mlxsw_core_driver_unregister(&mlxsw_sp2_driver);
|
||||
err_sp2_core_driver_register:
|
||||
|
Loading…
Reference in New Issue
Block a user