aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/ibmphp_core.c
diff options
context:
space:
mode:
authorJulia Lawall <[email protected]>2016-01-11 14:22:36 +0000
committerBjorn Helgaas <[email protected]>2016-01-11 14:22:36 +0000
commit4058937a40f73d46502f6042f87bc90f99bc36fe (patch)
tree9357b0f0c63387a3345444cfca674b583e605ee3 /drivers/pci/hotplug/ibmphp_core.c
parentPCI: hotplug: Use list_for_each_entry() to simplify code (diff)
downloadkernel-4058937a40f73d46502f6042f87bc90f99bc36fe.tar.gz
kernel-4058937a40f73d46502f6042f87bc90f99bc36fe.zip
PCI: ibmphp: Remove unneeded NULL test
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]>
Diffstat (limited to 'drivers/pci/hotplug/ibmphp_core.c')
-rw-r--r--drivers/pci/hotplug/ibmphp_core.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/pci/hotplug/ibmphp_core.c b/drivers/pci/hotplug/ibmphp_core.c
index 010e46a0c466..49adf2278c14 100644
--- a/drivers/pci/hotplug/ibmphp_core.c
+++ b/drivers/pci/hotplug/ibmphp_core.c
@@ -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)