Commit d9fb932f authored by Dan Carpenter's avatar Dan Carpenter Committed by Saeed Mahameed

net/mlx5e: Fix an IS_ERR() vs NULL check

The esw_vport_tbl_get() function returns error pointers on error.

Fixes: 96e32687 ("net/mlx5e: Eswitch, Use per vport tables for mirroring")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent 2fbbc30d
...@@ -198,7 +198,7 @@ int mlx5_esw_vport_tbl_get(struct mlx5_eswitch *esw) ...@@ -198,7 +198,7 @@ int mlx5_esw_vport_tbl_get(struct mlx5_eswitch *esw)
mlx5_esw_for_all_vports(esw, i, vport) { mlx5_esw_for_all_vports(esw, i, vport) {
attr.in_rep->vport = vport->vport; attr.in_rep->vport = vport->vport;
fdb = esw_vport_tbl_get(esw, &attr); fdb = esw_vport_tbl_get(esw, &attr);
if (!fdb) if (IS_ERR(fdb))
goto out; goto out;
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment