From: Markus Elfring <Markus.Elfring@web.de>
To: Chiara Meiohas <cmeiohas@nvidia.com>,
Tariq Toukan <tariqt@nvidia.com>,
Vlad Dumitrescu <vdumitrescu@nvidia.com>,
linux-rdma@vger.kernel.org, netdev@vger.kernel.org,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Leon Romanovsky <leon@kernel.org>,
Moshe Shemesh <moshe@nvidia.com>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Gal Pressman <gal@nvidia.com>, Mark Bloch <mbloch@nvidia.com>,
Saeed Mahameed <saeed@kernel.org>,
Saeed Mahameed <saeedm@nvidia.com>
Subject: Re: [PATCH net 1/2] net/mlx5: Fix memory leak in cmd_exec()
Date: Sun, 20 Jul 2025 14:15:05 +0200 [thread overview]
Message-ID: <73bede3e-c00e-4a55-9095-b9a3dc8765a6@web.de> (raw)
In-Reply-To: <1752753970-261832-2-git-send-email-tariqt@nvidia.com>
…
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
> @@ -1947,8 +1947,8 @@ static int cmd_exec(struct mlx5_core_dev *dev, void *in, int in_size, void *out,
>
> err = mlx5_cmd_invoke(dev, inb, outb, out, out_size, callback, context,
> pages_queue, token, force_polling);
> - if (callback)
> - return err;
> + if (callback && !err)
Can an other order become more appropriate for the items of this condition check?
> + return 0;
>
> if (err > 0) /* Failed in FW, command didn't execute */
> err = deliv_status_to_err(err);
Regards,
Markus
next prev parent reply other threads:[~2025-07-20 12:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-17 12:06 [PATCH net 0/2] mlx5 misc fixes 2025-07-17 Tariq Toukan
2025-07-17 12:06 ` [PATCH net 1/2] net/mlx5: Fix memory leak in cmd_exec() Tariq Toukan
2025-07-18 13:58 ` Simon Horman
2025-07-20 12:15 ` Markus Elfring [this message]
2025-07-17 12:06 ` [PATCH net 2/2] net/mlx5: E-Switch, Fix peer miss rules to use peer eswitch Tariq Toukan
2025-07-18 13:59 ` Simon Horman
2025-07-19 0:50 ` [PATCH net 0/2] mlx5 misc fixes 2025-07-17 patchwork-bot+netdevbpf
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=73bede3e-c00e-4a55-9095-b9a3dc8765a6@web.de \
--to=markus.elfring@web.de \
--cc=andrew+netdev@lunn.ch \
--cc=cmeiohas@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mbloch@nvidia.com \
--cc=moshe@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeed@kernel.org \
--cc=saeedm@nvidia.com \
--cc=tariqt@nvidia.com \
--cc=vdumitrescu@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®