[PATCH] um: vector: Remove unnecessary NULL check in destroy_queue()
Tiwei Bie
tiwei.btw at antgroup.com
Sat Apr 11 09:37:05 PDT 2026
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 at intel.com>
Reported-by: Dan Carpenter <error27 at gmail.com>
Closes: https://lore.kernel.org/r/202604110937.MLUL70Lx-lkp@intel.com/
Signed-off-by: Tiwei Bie <tiwei.btw at 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
More information about the linux-um
mailing list