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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;