[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <62aa411f-b848-44d3-9b2c-7173b86edbd2@intel.com>
Date: Fri, 3 Nov 2023 10:51:40 +0100
From: Wojciech Drewek <wojciech.drewek@...el.com>
To: Dan Carpenter <dan.carpenter@...aro.org>, Saeed Mahameed
<saeedm@...dia.com>
CC: Leon Romanovsky <leon@...nel.org>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
<kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Eli Cohen
<elic@...dia.com>, <netdev@...r.kernel.org>, <linux-rdma@...r.kernel.org>,
<kernel-janitors@...r.kernel.org>
Subject: Re: [PATCH net] net/mlx5: Fix a NULL vs IS_ERR() check
On 03.11.2023 07:36, Dan Carpenter wrote:
> The mlx5_esw_offloads_devlink_port() function returns error pointers, not
> NULL.
>
> Fixes: 7bef147a6ab6 ("net/mlx5: Don't skip vport check")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
> ---
> I *think* these normally go through the mellanox tree and not net.
Reviewed-by: Wojciech Drewek <wojciech.drewek@...el.com>
>
> drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
> index 693e55b010d9..5c569d4bfd00 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
> @@ -1493,7 +1493,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);
> }
Powered by blists - more mailing lists