Skip to content

Commit ca4ef28

Browse files
Dan CarpenterSaeed Mahameed
authored andcommitted
net/mlx5: Fix a NULL vs IS_ERR() check
The mlx5_esw_offloads_devlink_port() function returns error pointers, not NULL. Fixes: 7bef147 ("net/mlx5: Don't skip vport check") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Wojciech Drewek <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 7aaf975 commit ca4ef28

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+1
-1
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_rep.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1497,7 +1497,7 @@ mlx5e_vport_vf_rep_load(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep)
14971497

14981498
dl_port = mlx5_esw_offloads_devlink_port(dev->priv.eswitch,
14991499
rpriv->rep->vport);
1500-
if (dl_port) {
1500+
if (!IS_ERR(dl_port)) {
15011501
SET_NETDEV_DEVLINK_PORT(netdev, dl_port);
15021502
mlx5e_rep_vnic_reporter_create(priv, dl_port);
15031503
}

0 commit comments

Comments
 (0)