Skip to content

Commit

Permalink
PCI: ibmphp: Remove unneeded NULL test
Browse files Browse the repository at this point in the history
Remove unneeded NULL test.  The index variable of list_for_each_entry is
never NULL, as it is the structure that contains the list pointer.

Generated by: scripts/coccinelle/iterators/itnull.cocci

Signed-off-by: Fengguang Wu <[email protected]>
Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
CC: Geliang Tang <[email protected]>
  • Loading branch information
JuliaLawall authored and bjorn-helgaas committed Jan 11, 2016
1 parent 2ac83cc commit 4058937
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/pci/hotplug/ibmphp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,9 +503,6 @@ static int __init init_ops(void)
int rc;

list_for_each_entry(slot_cur, &ibmphp_slot_head, ibm_slot_list) {
if (!slot_cur)
return -ENODEV;

debug("BEFORE GETTING SLOT STATUS, slot # %x\n",
slot_cur->number);
if (slot_cur->ctrl->revision == 0xFF)
Expand Down

0 comments on commit 4058937

Please sign in to comment.