X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fpci%2Fhotplug%2Fpciehprm_acpi.c;h=ff19a806f593e433beb19c6cbb9d46f41c231c03;hb=f9296eb00ed30209424102d3c920e69617eea853;hp=b127575ec98516029298fbc817acc7421f6d6fde;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/drivers/pci/hotplug/pciehprm_acpi.c b/drivers/pci/hotplug/pciehprm_acpi.c index b127575ec..ff19a806f 100644 --- a/drivers/pci/hotplug/pciehprm_acpi.c +++ b/drivers/pci/hotplug/pciehprm_acpi.c @@ -218,10 +218,6 @@ static void acpi_get__hpp ( struct acpi_bridge *ab) } ab->_hpp = kmalloc (sizeof (struct acpi__hpp), GFP_KERNEL); - if (!ab->_hpp) { - err ("acpi_pciehprm:%s alloc for _HPP failed\n", path_name); - goto free_and_return; - } memset(ab->_hpp, 0, sizeof(struct acpi__hpp)); ab->_hpp->cache_line_size = nui[0]; @@ -1397,7 +1393,7 @@ static int configure_existing_function( static int bind_pci_resources_to_slots ( struct controller *ctrl) { - struct pci_func *func, new_func; + struct pci_func *func; int busn = ctrl->slot_bus; int devn, funn; u32 vid; @@ -1415,19 +1411,11 @@ static int bind_pci_resources_to_slots ( struct controller *ctrl) if (vid != 0xFFFFFFFF) { dbg("%s: vid = %x\n", __FUNCTION__, vid); func = pciehp_slot_find(busn, devn, funn); - if (!func) { - memset(&new_func, 0, sizeof(struct pci_func)); - new_func.bus = busn; - new_func.device = devn; - new_func.function = funn; - new_func.is_a_board = 1; - configure_existing_function(ctrl, &new_func); - pciehprm_dump_func_res(&new_func); - } else { - configure_existing_function(ctrl, func); - pciehprm_dump_func_res(func); - } + if (!func) + continue; + configure_existing_function(ctrl, func); dbg("aCCF:existing PCI 0x%x Func ResourceDump\n", ctrl->bus); + pciehprm_dump_func_res(func); } } }