From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Matan Azrad <matan@nvidia.com>,
Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Subject: [PATCH 1/3] vdpa/mlx5: remove unnecessary null check
Date: Wed, 22 Jun 2022 11:51:56 -0700 [thread overview]
Message-ID: <20220622185158.397779-2-stephen@networkplumber.org> (raw)
In-Reply-To: <20220622185158.397779-1-stephen@networkplumber.org>
Found by nullfree.cocci.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
index e025be47d277..e06d6afb676f 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
@@ -285,8 +285,7 @@ mlx5_vdpa_virtq_setup(struct mlx5_vdpa_priv *priv, int index)
if (virtq->umems[i].obj)
claim_zero(mlx5_glue->devx_umem_dereg
(virtq->umems[i].obj));
- if (virtq->umems[i].buf)
- rte_free(virtq->umems[i].buf);
+ rte_free(virtq->umems[i].buf);
virtq->umems[i].size = 0;
virtq->umems[i].obj = NULL;
virtq->umems[i].buf = NULL;
--
2.35.1
next prev parent reply other threads:[~2022-06-22 18:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-22 18:51 [PATCH 0/3] more null pointer check removal Stephen Hemminger
2022-06-22 18:51 ` Stephen Hemminger [this message]
2022-06-23 9:13 ` [PATCH 1/3] vdpa/mlx5: remove unnecessary null check Matan Azrad
2022-06-22 18:51 ` [PATCH 2/3] raw/ifpga: " Stephen Hemminger
2022-06-22 18:51 ` [PATCH 3/3] dmap/dpaa2: " Stephen Hemminger
2022-06-22 19:05 ` [PATCH 0/3] more null pointer check removal Tyler Retzlaff
2022-06-23 0:43 ` fengchengwen
2022-06-24 12:39 ` David Marchand
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=20220622185158.397779-2-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=matan@nvidia.com \
--cc=viacheslavo@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;
as well as URLs for NNTP newsgroup(s).