mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 13:06:59 +02:00
net/mlx5: Fix a NULL vs IS_ERR() check
[ Upstream commitca4ef28d0a] The mlx5_esw_offloads_devlink_port() function returns error pointers, not NULL. Fixes:7bef147a6a("net/mlx5: Don't skip vport check") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
ef3b2d5f21
commit
6cb39c79bc
|
|
@ -1503,7 +1503,7 @@ mlx5e_vport_vf_rep_load(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep)
|
|||
|
||||
dl_port = mlx5_esw_offloads_devlink_port(dev->priv.eswitch,
|
||||
rpriv->rep->vport);
|
||||
if (dl_port) {
|
||||
if (!IS_ERR(dl_port)) {
|
||||
SET_NETDEV_DEVLINK_PORT(netdev, dl_port);
|
||||
mlx5e_rep_vnic_reporter_create(priv, dl_port);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user