From: Tiwei Bie <tiwei.btw@antgroup.com>
To: richard@nod.at, anton.ivanov@cambridgegreys.com,
johannes@sipsolutions.net
Cc: linux-um@lists.infradead.org, Tiwei Bie <tiwei.btw@antgroup.com>,
kernel test robot <lkp@intel.com>,
Dan Carpenter <error27@gmail.com>
Subject: [PATCH] um: vector: Remove unnecessary NULL check in destroy_queue()
Date: Sun, 12 Apr 2026 00:37:05 +0800 [thread overview]
Message-ID: <20260411163705.948426-1-tiwei.btw@antgroup.com> (raw)
All callers of destroy_queue() already perform a NULL check, so
a NULL qi will never be passed in. Inside destroy_queue(), we
dereference qi immediately, and the subsequent NULL check on qi
is unnecessary and confusing. Remove it to address the smatch
warning.
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Closes: https://lore.kernel.org/r/202604110937.MLUL70Lx-lkp@intel.com/
Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
---
arch/um/drivers/vector_kern.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/um/drivers/vector_kern.c b/arch/um/drivers/vector_kern.c
index 2cc90055499a..755d936e5b43 100644
--- a/arch/um/drivers/vector_kern.c
+++ b/arch/um/drivers/vector_kern.c
@@ -471,8 +471,6 @@ static void destroy_queue(struct vector_queue *qi)
struct vector_private *vp = netdev_priv(qi->dev);
struct mmsghdr *mmsg_vector;
- if (qi == NULL)
- return;
/* deallocate any skbuffs - we rely on any unused to be
* set to NULL.
*/
--
2.34.1
next reply other threads:[~2026-04-11 16:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-11 16:37 Tiwei Bie [this message]
2026-04-11 16:41 ` [PATCH] um: vector: Remove unnecessary NULL check in destroy_queue() Anton Ivanov
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=20260411163705.948426-1-tiwei.btw@antgroup.com \
--to=tiwei.btw@antgroup.com \
--cc=anton.ivanov@cambridgegreys.com \
--cc=error27@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-um@lists.infradead.org \
--cc=lkp@intel.com \
--cc=richard@nod.at \
/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