]> git.hungrycats.org Git - linux/commitdiff
[PATCH] cpqarray: rmmod oops fix
authorAndrew Morton <akpm@osdl.org>
Tue, 16 Mar 2004 23:10:06 +0000 (15:10 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 16 Mar 2004 23:10:06 +0000 (15:10 -0800)
From: <mikem@beardog.cca.cpqcorp.net>

* Fix for segmentation fault when calling rmmod

drivers/block/cpqarray.c

index 887d8bb60f19b6b5b59b3cd4bf2d016c509be316..e841f97d4427c0d817ae16e351e394d85a7033dd 100644 (file)
@@ -300,7 +300,6 @@ static void __exit cpqarray_exit(void)
                iounmap(hba[i]->vaddr);
                unregister_blkdev(COMPAQ_SMART2_MAJOR+i, hba[i]->devname);
                del_timer(&hba[i]->timer);
-               blk_cleanup_queue(hba[i]->queue);
                remove_proc_entry(hba[i]->devname, proc_array);
                pci_free_consistent(hba[i]->pci_dev, 
                        NR_CMDS * sizeof(cmdlist_t), (hba[i]->cmd_pool), 
@@ -313,6 +312,7 @@ static void __exit cpqarray_exit(void)
                        devfs_remove("ida/c%dd%d",i,j);
                        put_disk(ida_gendisk[i][j]);
                }
+               blk_cleanup_queue(hba[i]->queue);
        }
        devfs_remove("ida");
        remove_proc_entry("cpqarray", proc_root_driver);