| From | Greg Kroah-Hartman <> | Subject | [PATCH 4.19 18/45] mlxsw: spectrum: Fix error path in mlxsw_sp_module_init() | Date | Thu, 8 Aug 2019 21:05:04 +0200 |
| |
From: Jiri Pirko <jiri@mellanox.com>
[ Upstream commit 28fe79000e9b0a6f99959869947f1ca305f14599 ]
In case of sp2 pci driver registration fail, fix the error path to start with sp1 pci driver unregister.
Fixes: c3ab435466d5 ("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c @@ -5032,7 +5032,7 @@ static int __init mlxsw_sp_module_init(v 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:
|