mirror of
https://github.com/torvalds/linux.git
synced 2026-11-09 13:44:03 +01:00
um: vector: Remove unnecessary NULL check in destroy_queue()
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> Acked-By: Anton Ivanov <anton.ivanov@cambridgegreys.com> Link: https://patch.msgid.link/20260411163705.948426-1-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
5bde583d13
commit
28ada50b74
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user