/*
* Free controller resources.
*/
-static void sym_free_resources(struct sym_hcb *np, struct pci_dev *pdev)
+static void sym_free_resources(struct sym_hcb *np, struct pci_dev *pdev,
+ int do_free_irq)
{
/*
* Free O/S specific resources.
*/
- if (pdev->irq)
+ if (do_free_irq)
free_irq(pdev->irq, np->s.host);
if (np->s.ioaddr)
pci_iounmap(pdev, np->s.ioaddr);
struct pci_dev *pdev = dev->pdev;
unsigned long flags;
struct sym_fw *fw;
+ int do_free_irq = 0;
printk(KERN_INFO "sym%d: <%s> rev 0x%x at pci %s irq %u\n",
unit, dev->chip.name, pdev->revision, pci_name(pdev),
sym_name(np), pdev->irq);
goto attach_failed;
}
+ do_free_irq = 1;
/*
* After SCSI devices have been opened, we cannot
return NULL;
printf_info("sym%d: giving up ...\n", unit);
if (np)
- sym_free_resources(np, pdev);
+ sym_free_resources(np, pdev, do_free_irq);
scsi_host_put(shost);
return NULL;
udelay(10);
OUTB(np, nc_istat, 0);
- sym_free_resources(np, pdev);
+ sym_free_resources(np, pdev, 1);
scsi_host_put(shost);
return 1;