drivers/scsi/aic7xxx/aic7xxx_osm_pci.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) diff -puN drivers/scsi/aic7xxx/aic7xxx_osm_pci.c~aic7xxx-sleep-in-spinlock-fix drivers/scsi/aic7xxx/aic7xxx_osm_pci.c --- 25/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c~aic7xxx-sleep-in-spinlock-fix 2003-10-26 18:51:45.000000000 -0800 +++ 25-akpm/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 2003-10-26 18:52:11.000000000 -0800 @@ -100,9 +100,10 @@ ahc_linux_pci_dev_remove(struct pci_dev ahc_lock(ahc, &s); ahc_intr_enable(ahc, FALSE); ahc_unlock(ahc, &s); - ahc_free(ahc); } ahc_list_unlock(&l); + if (ahc) + ahc_free(ahc); } #endif /* !LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0) */ _