mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
net/mlx5: Fix a NULL vs IS_ERR() check
[ Upstream commit ca4ef28d0ad831d2521fa2b16952f37fd9324ca3 ]
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:
committed by
Greg Kroah-Hartman
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user