diff options
| author | Wei Yongjun <weiyongjun1@huawei.com> | 2017-11-06 06:11:28 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2017-11-07 23:25:15 -0500 |
| commit | d86fd113ebbb37726ef7c7cc6fd6d5ce377455d6 (patch) | |
| tree | a172a08f3e9022ee217277398b3dd70c73bfd66c | |
| parent | 29130853fe6dee04ad88d0586ff39182fa408a75 (diff) | |
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: c57529e1d5d8 ("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>
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c index 1497b436be78..b2cd1ebf4e36 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c | |||
| @@ -3043,6 +3043,7 @@ static int mlxsw_sp_port_create(struct mlxsw_sp *mlxsw_sp, u8 local_port, | |||
| 3043 | if (IS_ERR(mlxsw_sp_port_vlan)) { | 3043 | if (IS_ERR(mlxsw_sp_port_vlan)) { |
| 3044 | dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to create VID 1\n", | 3044 | dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to create VID 1\n", |
| 3045 | mlxsw_sp_port->local_port); | 3045 | mlxsw_sp_port->local_port); |
| 3046 | err = PTR_ERR(mlxsw_sp_port_vlan); | ||
| 3046 | goto err_port_vlan_get; | 3047 | goto err_port_vlan_get; |
| 3047 | } | 3048 | } |
| 3048 | 3049 | ||
