mirror of https://gitee.com/openkylin/linux.git
net/mlx5e: Fix an IS_ERR() vs NULL check
The esw_vport_tbl_get() function returns error pointers on error.
Fixes: 96e326878f
("net/mlx5e: Eswitch, Use per vport tables for mirroring")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
This commit is contained in:
parent
2fbbc30da0
commit
d9fb932fde
|
@ -198,7 +198,7 @@ int mlx5_esw_vport_tbl_get(struct mlx5_eswitch *esw)
|
|||
mlx5_esw_for_all_vports(esw, i, vport) {
|
||||
attr.in_rep->vport = vport->vport;
|
||||
fdb = esw_vport_tbl_get(esw, &attr);
|
||||
if (!fdb)
|
||||
if (IS_ERR(fdb))
|
||||
goto out;
|
||||
}
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue