From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: Sachin Saxena <sachin.saxena@oss.nxp.com>,
Hemant Agrawal <hemant.agrawal@nxp.com>
Subject: [PATCH] raw/skeleton: remove useless check
Date: Tue, 4 Oct 2022 10:00:26 +0200 [thread overview]
Message-ID: <20221004080026.180919-1-david.marchand@redhat.com> (raw)
As reported by Coverity, this check is pointless since dev is already
dereferenced earlier. Besides, dev is passed by the rawdev layer and
can't be NULL.
Note: the issue was probably present before the incriminated commit.
It is unclear why Coverity would start complaining about this now.
Coverity issue: 380991
Fixes: 8f1d23ece06a ("eal: deprecate RTE_FUNC_PTR_* macros")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/raw/skeleton/skeleton_rawdev.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/raw/skeleton/skeleton_rawdev.c b/drivers/raw/skeleton/skeleton_rawdev.c
index 1d043bec5d..b2ca1cc5cd 100644
--- a/drivers/raw/skeleton/skeleton_rawdev.c
+++ b/drivers/raw/skeleton/skeleton_rawdev.c
@@ -475,9 +475,6 @@ static int skeleton_rawdev_firmware_status_get(struct rte_rawdev *dev,
skeldev = skeleton_rawdev_get_priv(dev);
- if (dev == NULL)
- return -EINVAL;
-
if (status_info)
memcpy(status_info, &skeldev->fw.firmware_state,
sizeof(enum skeleton_firmware_state));
--
2.37.3
next reply other threads:[~2022-10-04 8:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-04 8:00 David Marchand [this message]
2022-10-04 12:19 ` Hemant Agrawal
2022-10-05 19:36 ` 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=20221004080026.180919-1-david.marchand@redhat.com \
--to=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=hemant.agrawal@nxp.com \
--cc=sachin.saxena@oss.nxp.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).