Skip to contentSkip to conversation

Remove unnecessary check in drivers/pci/hotplug/pciehp_ctrl.c

PATCH New Eric Sesterhenn 1 participant 1 message Sep 24, 2006 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove unnecessary check in drivers/pci/hotplug/pciehp_ctrl.c

hi,

this was spotted by coverity (cid #819). We dereference p_slot earlier in the function, and i found no way it could become NULL anywhere.

drivers/pci/hotplug/pciehp_ctrl.c renamed from drivers/pci/hotplug/pciehp_ctrl.c.orig +1 -2
@@ -790,8 +790,7 @@ int pciehp_enable_slot(struct slot *p_sl
 		p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
 	}
 
-	if (p_slot)
-		update_slot_info(p_slot);
+	update_slot_info(p_slot);
 
 	return rc;
 }