diff options
author | Adrian Bunk <bunk@stusta.de> | 2005-11-20 18:05:21 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-01-09 15:13:16 -0500 |
commit | 2555f7bdd3b0db47f6e1d7bb887981654e2261b3 (patch) | |
tree | 1004fd2af505c2bda7d74ae430a0613df4515083 /drivers/pci/hotplug | |
parent | 88d69a1dff4014889782ebad24ed3e964a8844bc (diff) |
[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: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r-- | drivers/pci/hotplug/cpqphp_ctrl.c | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/drivers/pci/hotplug/cpqphp_ctrl.c b/drivers/pci/hotplug/cpqphp_ctrl.c index 10a5a7674a8a..771ed34b1819 100644 --- a/drivers/pci/hotplug/cpqphp_ctrl.c +++ b/drivers/pci/hotplug/cpqphp_ctrl.c | |||
@@ -2630,29 +2630,15 @@ static int configure_new_function(struct controller *ctrl, struct pci_func *func | |||
2630 | hold_mem_node = NULL; | 2630 | hold_mem_node = NULL; |
2631 | } | 2631 | } |
2632 | 2632 | ||
2633 | /* If we have prefetchable memory resources copy them and | 2633 | memcpy(hold_p_mem_node, p_mem_node, sizeof(struct pci_resource)); |
2634 | * fill in the bridge's memory range registers. Otherwise, | 2634 | p_mem_node->next = NULL; |
2635 | * fill in the range registers with values that disable them. */ | ||
2636 | if (p_mem_node) { | ||
2637 | memcpy(hold_p_mem_node, p_mem_node, sizeof(struct pci_resource)); | ||
2638 | p_mem_node->next = NULL; | ||
2639 | |||
2640 | /* set Pre Mem base and Limit registers */ | ||
2641 | temp_word = p_mem_node->base >> 16; | ||
2642 | rc = pci_bus_write_config_word (pci_bus, devfn, PCI_PREF_MEMORY_BASE, temp_word); | ||
2643 | |||
2644 | temp_word = (p_mem_node->base + p_mem_node->length - 1) >> 16; | ||
2645 | rc = pci_bus_write_config_word (pci_bus, devfn, PCI_PREF_MEMORY_LIMIT, temp_word); | ||
2646 | } else { | ||
2647 | temp_word = 0xFFFF; | ||
2648 | rc = pci_bus_write_config_word (pci_bus, devfn, PCI_PREF_MEMORY_BASE, temp_word); | ||
2649 | 2635 | ||
2650 | temp_word = 0x0000; | 2636 | /* set Pre Mem base and Limit registers */ |
2651 | rc = pci_bus_write_config_word (pci_bus, devfn, PCI_PREF_MEMORY_LIMIT, temp_word); | 2637 | temp_word = p_mem_node->base >> 16; |
2638 | rc = pci_bus_write_config_word (pci_bus, devfn, PCI_PREF_MEMORY_BASE, temp_word); | ||
2652 | 2639 | ||
2653 | kfree(hold_p_mem_node); | 2640 | temp_word = (p_mem_node->base + p_mem_node->length - 1) >> 16; |
2654 | hold_p_mem_node = NULL; | 2641 | rc = pci_bus_write_config_word (pci_bus, devfn, PCI_PREF_MEMORY_LIMIT, temp_word); |
2655 | } | ||
2656 | 2642 | ||
2657 | /* Adjust this to compensate for extra adjustment in first loop */ | 2643 | /* Adjust this to compensate for extra adjustment in first loop */ |
2658 | irqs.barber_pole--; | 2644 | irqs.barber_pole--; |