Commit 2555f7bd authored by Adrian Bunk's avatar Adrian Bunk Committed by Greg Kroah-Hartman

[PATCH] PCI Hotplug: cpqphp_ctrl.c: remove dead code

The Coverity checker spotted that we already did return -ENOMEM
if (!p_mem_node).
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 88d69a1d
...@@ -2630,10 +2630,6 @@ static int configure_new_function(struct controller *ctrl, struct pci_func *func ...@@ -2630,10 +2630,6 @@ static int configure_new_function(struct controller *ctrl, struct pci_func *func
hold_mem_node = NULL; hold_mem_node = NULL;
} }
/* If we have prefetchable memory resources copy them and
* fill in the bridge's memory range registers. Otherwise,
* fill in the range registers with values that disable them. */
if (p_mem_node) {
memcpy(hold_p_mem_node, p_mem_node, sizeof(struct pci_resource)); memcpy(hold_p_mem_node, p_mem_node, sizeof(struct pci_resource));
p_mem_node->next = NULL; p_mem_node->next = NULL;
...@@ -2643,16 +2639,6 @@ static int configure_new_function(struct controller *ctrl, struct pci_func *func ...@@ -2643,16 +2639,6 @@ static int configure_new_function(struct controller *ctrl, struct pci_func *func
temp_word = (p_mem_node->base + p_mem_node->length - 1) >> 16; temp_word = (p_mem_node->base + p_mem_node->length - 1) >> 16;
rc = pci_bus_write_config_word (pci_bus, devfn, PCI_PREF_MEMORY_LIMIT, temp_word); rc = pci_bus_write_config_word (pci_bus, devfn, PCI_PREF_MEMORY_LIMIT, temp_word);
} else {
temp_word = 0xFFFF;
rc = pci_bus_write_config_word (pci_bus, devfn, PCI_PREF_MEMORY_BASE, temp_word);
temp_word = 0x0000;
rc = pci_bus_write_config_word (pci_bus, devfn, PCI_PREF_MEMORY_LIMIT, temp_word);
kfree(hold_p_mem_node);
hold_p_mem_node = NULL;
}
/* Adjust this to compensate for extra adjustment in first loop */ /* Adjust this to compensate for extra adjustment in first loop */
irqs.barber_pole--; irqs.barber_pole--;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment