fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / pci / hotplug / cpqphp_pci.c
index 93e39c4..fc7c74d 100644 (file)
@@ -26,7 +26,6 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
@@ -34,6 +33,7 @@
 #include <linux/workqueue.h>
 #include <linux/proc_fs.h>
 #include <linux/pci.h>
+#include <linux/pci_hotplug.h>
 #include "../pci.h"
 #include "cpqphp.h"
 #include "cpqphp_nvram.h"
@@ -259,8 +259,7 @@ static int PCI_GetBusDevHelper(struct controller *ctrl, u8 *bus_num, u8 *dev_num
               sizeof(struct irq_routing_table)) / sizeof(struct irq_info);
        // Make sure I got at least one entry
        if (len == 0) {
-               if (PCIIRQRoutingInfoLength != NULL)
-                       kfree(PCIIRQRoutingInfoLength );
+               kfree(PCIIRQRoutingInfoLength );
                return -1;
        }
 
@@ -275,8 +274,7 @@ static int PCI_GetBusDevHelper(struct controller *ctrl, u8 *bus_num, u8 *dev_num
                        ctrl->pci_bus->number = tbus;
                        pci_bus_read_config_dword (ctrl->pci_bus, *dev_num, PCI_VENDOR_ID, &work);
                        if (!nobridge || (work == 0xffffffff)) {
-                               if (PCIIRQRoutingInfoLength != NULL)
-                                       kfree(PCIIRQRoutingInfoLength );
+                               kfree(PCIIRQRoutingInfoLength );
                                return 0;
                        }
 
@@ -289,20 +287,17 @@ static int PCI_GetBusDevHelper(struct controller *ctrl, u8 *bus_num, u8 *dev_num
                                dbg("Scan bus for Non Bridge: bus %d\n", tbus);
                                if (PCI_ScanBusForNonBridge(ctrl, tbus, dev_num) == 0) {
                                        *bus_num = tbus;
-                                       if (PCIIRQRoutingInfoLength != NULL)
-                                               kfree(PCIIRQRoutingInfoLength );
+                                       kfree(PCIIRQRoutingInfoLength );
                                        return 0;
                                }
                        } else {
-                               if (PCIIRQRoutingInfoLength != NULL)
-                                       kfree(PCIIRQRoutingInfoLength );
+                               kfree(PCIIRQRoutingInfoLength );
                                return 0;
                        }
 
                }
        }
-       if (PCIIRQRoutingInfoLength != NULL)
-               kfree(PCIIRQRoutingInfoLength );
+       kfree(PCIIRQRoutingInfoLength );
        return -1;
 }