Skip to content
Commit 4daf5f19 authored by Xiaomeng Tong's avatar Xiaomeng Tong Committed by Jakub Kicinski
Browse files

qed: remove an unneed NULL check on list iterator



The define for_each_pci_dev(d) is:
 while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL)

Thus, the list iterator 'd' is always non-NULL so it doesn't need to
be checked. So just remove the unnecessary NULL check. Also remove the
unnecessary initializer because the list iterator is always initialized.

Signed-off-by: default avatarXiaomeng Tong <xiam0nd.tong@gmail.com>
Link: https://lore.kernel.org/r/20220406015921.29267-1-xiam0nd.tong@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 6a62924c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment