Re: [PATCH] um: vector: Remove unnecessary NULL check in destroy_queue()
Anton Ivanov <[email protected]>
| Newsgroups | gmane.linux.uml.devel |
|---|---|
| Organization | Cambridge Greys |
| Message-ID | <[email protected]> |
On 11/04/2026 17:37, Tiwei Bie wrote: > 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 <[email protected]> > Reported-by: Dan Carpenter <[email protected]> > Closes: https://lore.kernel.org/r/[email protected]/ > Signed-off-by: Tiwei Bie <[email protected]> > --- > 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. > */ Acked-By: Anton Ivanov <[email protected]> -- Anton R. Ivanov Cambridgegreys Limited. Registered in England. Company Number 10273661