Skip to content

Commit d86fd11

Browse files
Wei Yongjundavem330
authored andcommitted
mlxsw: spectrum: Fix error return code in mlxsw_sp_port_create()
Fix to return a negative error code from the VID create error handling case instead of 0, as done elsewhere in this function. Fixes: c57529e ("mlxsw: spectrum: Replace vPorts with Port-VLAN") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 2913085 commit d86fd11

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/ethernet/mellanox/mlxsw/spectrum.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3043,6 +3043,7 @@ static int mlxsw_sp_port_create(struct mlxsw_sp *mlxsw_sp, u8 local_port,
30433043
if (IS_ERR(mlxsw_sp_port_vlan)) {
30443044
dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to create VID 1\n",
30453045
mlxsw_sp_port->local_port);
3046+
err = PTR_ERR(mlxsw_sp_port_vlan);
30463047
goto err_port_vlan_get;
30473048
}
30483049

0 commit comments

Comments
 (0)