ChangeSet 1.1587.12.37, 2004/04/30 14:13:24-07:00, eike-hotplug@sf-tec.de [PATCH] Compaq PCI Hotplug: remove useless NULL checks from cpqphp_core.c Remove some useless NULL checks in cpqphp_core.c drivers/pci/hotplug/cpqphp_core.c | 16 +++------------- 1 files changed, 3 insertions(+), 13 deletions(-) diff -Nru a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c --- a/drivers/pci/hotplug/cpqphp_core.c Mon May 17 17:02:05 2004 +++ b/drivers/pci/hotplug/cpqphp_core.c Mon May 17 17:02:05 2004 @@ -310,10 +310,7 @@ static void release_slot(struct hotplug_slot *hotplug_slot) { struct slot *slot = hotplug_slot->private; - - if (slot == NULL) - return; - + dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); kfree(slot->hotplug_slot->info); @@ -614,21 +611,14 @@ { struct pci_func *slot_func; struct slot *slot = hotplug_slot->private; - struct controller *ctrl; + struct controller *ctrl = slot->ctrl; u8 bus; u8 devfn; u8 device; u8 function; - - if (slot == NULL) - return -ENODEV; - + dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); - ctrl = slot->ctrl; - if (ctrl == NULL) - return -ENODEV; - if (cpqhp_get_bus_dev(ctrl, &bus, &devfn, slot->number) == -1) return -ENODEV;