diff options
Diffstat (limited to 'drivers/pci/hotplug/cpqphp_pci.c')
-rw-r--r-- | drivers/pci/hotplug/cpqphp_pci.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/pci/hotplug/cpqphp_pci.c b/drivers/pci/hotplug/cpqphp_pci.c index 93e39c4096a..00b81a7bdd2 100644 --- a/drivers/pci/hotplug/cpqphp_pci.c +++ b/drivers/pci/hotplug/cpqphp_pci.c | |||
@@ -259,8 +259,7 @@ static int PCI_GetBusDevHelper(struct controller *ctrl, u8 *bus_num, u8 *dev_num | |||
259 | sizeof(struct irq_routing_table)) / sizeof(struct irq_info); | 259 | sizeof(struct irq_routing_table)) / sizeof(struct irq_info); |
260 | // Make sure I got at least one entry | 260 | // Make sure I got at least one entry |
261 | if (len == 0) { | 261 | if (len == 0) { |
262 | if (PCIIRQRoutingInfoLength != NULL) | 262 | kfree(PCIIRQRoutingInfoLength ); |
263 | kfree(PCIIRQRoutingInfoLength ); | ||
264 | return -1; | 263 | return -1; |
265 | } | 264 | } |
266 | 265 | ||
@@ -275,8 +274,7 @@ static int PCI_GetBusDevHelper(struct controller *ctrl, u8 *bus_num, u8 *dev_num | |||
275 | ctrl->pci_bus->number = tbus; | 274 | ctrl->pci_bus->number = tbus; |
276 | pci_bus_read_config_dword (ctrl->pci_bus, *dev_num, PCI_VENDOR_ID, &work); | 275 | pci_bus_read_config_dword (ctrl->pci_bus, *dev_num, PCI_VENDOR_ID, &work); |
277 | if (!nobridge || (work == 0xffffffff)) { | 276 | if (!nobridge || (work == 0xffffffff)) { |
278 | if (PCIIRQRoutingInfoLength != NULL) | 277 | kfree(PCIIRQRoutingInfoLength ); |
279 | kfree(PCIIRQRoutingInfoLength ); | ||
280 | return 0; | 278 | return 0; |
281 | } | 279 | } |
282 | 280 | ||
@@ -289,20 +287,17 @@ static int PCI_GetBusDevHelper(struct controller *ctrl, u8 *bus_num, u8 *dev_num | |||
289 | dbg("Scan bus for Non Bridge: bus %d\n", tbus); | 287 | dbg("Scan bus for Non Bridge: bus %d\n", tbus); |
290 | if (PCI_ScanBusForNonBridge(ctrl, tbus, dev_num) == 0) { | 288 | if (PCI_ScanBusForNonBridge(ctrl, tbus, dev_num) == 0) { |
291 | *bus_num = tbus; | 289 | *bus_num = tbus; |
292 | if (PCIIRQRoutingInfoLength != NULL) | 290 | kfree(PCIIRQRoutingInfoLength ); |
293 | kfree(PCIIRQRoutingInfoLength ); | ||
294 | return 0; | 291 | return 0; |
295 | } | 292 | } |
296 | } else { | 293 | } else { |
297 | if (PCIIRQRoutingInfoLength != NULL) | 294 | kfree(PCIIRQRoutingInfoLength ); |
298 | kfree(PCIIRQRoutingInfoLength ); | ||
299 | return 0; | 295 | return 0; |
300 | } | 296 | } |
301 | 297 | ||
302 | } | 298 | } |
303 | } | 299 | } |
304 | if (PCIIRQRoutingInfoLength != NULL) | 300 | kfree(PCIIRQRoutingInfoLength ); |
305 | kfree(PCIIRQRoutingInfoLength ); | ||
306 | return -1; | 301 | return -1; |
307 | } | 302 | } |
308 | 303 | ||