Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Wei Yongjun and committed by
David S. Miller
d86fd113 29130853

+1
+1
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
··· 3043 3043 if (IS_ERR(mlxsw_sp_port_vlan)) { 3044 3044 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to create VID 1\n", 3045 3045 mlxsw_sp_port->local_port); 3046 + err = PTR_ERR(mlxsw_sp_port_vlan); 3046 3047 goto err_port_vlan_get; 3047 3048 } 3048 3049