From: Saeed Mahameed <saeed.kernel@gmail.com>
To: Qing Wang <wangqing@vivo.com>, Saeed Mahameed <saeedm@nvidia.com>,
Leon Romanovsky <leon@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: ethernet: mellanox: return errno instead of 1
Date: Thu, 23 Dec 2021 11:34:55 -0800 [thread overview]
Message-ID: <d8cf5bd620e65351dbd82d18b0426a22ea77eae2.camel@gmail.com> (raw)
In-Reply-To: <1640226277-32786-1-git-send-email-wangqing@vivo.com>
On Wed, 2021-12-22 at 18:24 -0800, Qing Wang wrote:
> From: Wang Qing <wangqing@vivo.com>
>
> mlx5e_hv_vhca_stats_create() better return specific error than 1
>
> Signed-off-by: Wang Qing <wangqing@vivo.com>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/en/hv_vhca_stats.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git
> a/drivers/net/ethernet/mellanox/mlx5/core/en/hv_vhca_stats.c
> b/drivers/net/ethernet/mellanox/mlx5/core/en/hv_vhca_stats.c
> index d290d72..04cda3d
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en/hv_vhca_stats.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/hv_vhca_stats.c
> @@ -142,7 +142,7 @@ int mlx5e_hv_vhca_stats_create(struct mlx5e_priv
> *priv)
> PTR_ERR(agent));
>
> kvfree(priv->stats_agent.buf);
> - return IS_ERR_OR_NULL(agent);
> + return agent ? PTR_ERR(agent) : -ENODEV;
the single caller of this function ignores the return value,
I just made a patch to void the return value and added you as Reported-
by.
Thanks !
prev parent reply other threads:[~2021-12-23 19:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-23 2:24 [PATCH] net: ethernet: mellanox: return errno instead of 1 Qing Wang
2021-12-23 19:34 ` Saeed Mahameed [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d8cf5bd620e65351dbd82d18b0426a22ea77eae2.camel@gmail.com \
--to=saeed.kernel@gmail.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=saeedm@nvidia.com \
--cc=wangqing@vivo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.