PCI: ibmphp: Remove unneeded NULL test

Author: Julia Lawall <julia.lawall@lip6.fr>

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 
Signed-off-by: Julia Lawall 
Signed-off-by: Bjorn Helgaas 
CC: Geliang Tang 
---
 drivers/pci/hotplug/ibmphp_core.c | 3 ---
 1 file changed, 3 deletions(-)
 
diff --git a/drivers/pci/hotplug/ibmphp_core.c b/drivers/pci/hotplug/ibmphp_core.c
index 010e46a..49adf22 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)
BtrLinux
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.