[IA64-SGI] Hotplug driver related fix in the SN ia64 code.
authorPrarit Bhargava <prarit@sgi.com>
Thu, 9 Feb 2006 22:12:24 +0000 (14:12 -0800)
committerTony Luck <tony.luck@intel.com>
Thu, 9 Feb 2006 22:12:24 +0000 (14:12 -0800)
Remove an erroneous kfree, and unlink the pcidev_info struct from the
pcidev_info list prior to free'ing the pcidev_info struct.

Signed-off-by: Prarit Bhargava <prarit@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/sn/kernel/io_init.c
arch/ia64/sn/kernel/irq.c

index d7e4d79e16a8d425747d45abed163a124c98b6da..2e4e56be8df5cf4d7d6e6e3cfc1a019b344191e9 100644 (file)
@@ -623,6 +623,8 @@ sn_sysdata_free_start:
        list_for_each(list, &sn_sysdata_list) {
                element = list_entry(list, struct sysdata_el, entry);
                list_del(&element->entry);
+               list_del(&(((struct pcidev_info *)
+                            (element->sysdata))->pdi_list));
                kfree(element->sysdata);
                kfree(element);
                goto sn_sysdata_free_start;
index 74d87d903d5d9928aa1bbaaaad282df6a2269062..c373113d073a5f23a18fa051239b66f37f516243 100644 (file)
@@ -299,7 +299,9 @@ void sn_irq_unfixup(struct pci_dev *pci_dev)
                return;
 
        sn_irq_info = SN_PCIDEV_INFO(pci_dev)->pdi_sn_irq_info;
-       if (!sn_irq_info || !sn_irq_info->irq_irq) {
+       if (!sn_irq_info)
+               return;
+       if (!sn_irq_info->irq_irq) {
                kfree(sn_irq_info);
                return;
        }