diff mbox

[net,3/3] mlxsw: spectrum: Add missing DCB rollback in error path

Message ID 1470321382-10426-4-git-send-email-idosch@mellanox.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Ido Schimmel Aug. 4, 2016, 2:36 p.m. UTC
We correctly execute mlxsw_sp_port_dcb_fini() when port is removed, but
I missed its rollback in the error path of port creation, so add it.

Fixes: f00817df2b42 ("mlxsw: spectrum: Introduce support for Data Center Bridging (DCB)")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jiri Pirko Aug. 8, 2016, 4:30 p.m. UTC | #1
Thu, Aug 04, 2016 at 04:36:22PM CEST, idosch@mellanox.com wrote:
>We correctly execute mlxsw_sp_port_dcb_fini() when port is removed, but
>I missed its rollback in the error path of port creation, so add it.
>
>Fixes: f00817df2b42 ("mlxsw: spectrum: Introduce support for Data Center Bridging (DCB)")
>Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
diff mbox

Patch

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
index c3e6150..e1b8f62 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@ -2220,6 +2220,7 @@  err_port_vlan_init:
 err_core_port_init:
 	unregister_netdev(dev);
 err_register_netdev:
+	mlxsw_sp_port_dcb_fini(mlxsw_sp_port);
 err_port_dcb_init:
 err_port_ets_init:
 err_port_buffers_init: