qed: remove an unneed NULL check on list iterator
authorXiaomeng Tong <xiam0nd.tong@gmail.com>
Wed, 6 Apr 2022 01:59:21 +0000 (09:59 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 8 Apr 2022 04:04:10 +0000 (21:04 -0700)
commit4daf5f1956308641092769aa1924286b19513328
tree93401cd00dd94b0b493f847e76680cd005c4da5f
parent6a62924c0a81316b2aff713566593405b57545d5
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: Xiaomeng Tong <xiam0nd.tong@gmail.com>
Link: https://lore.kernel.org/r/20220406015921.29267-1-xiam0nd.tong@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/qlogic/qed/qed_nvmetcp_ip_services.c