From: Mike Miller Date: Tue, 13 Sep 2005 08:25:23 +0000 (-0700) Subject: [PATCH] cciss: bug fix in cciss_remove_one X-Git-Tag: v2.6.14-rc2~84 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a445d3ba6b90ce13a843ad5d1a0867388b08096;p=linux-2.6 [PATCH] cciss: bug fix in cciss_remove_one This patch fixes a bug in cciss_remove_one. A set of braces was missing for the if statement causing an Oops on driver unload. Signed-off-by: Mike Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index a12b95eef1..49f05410a1 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -3095,9 +3095,10 @@ static void __devexit cciss_remove_one (struct pci_dev *pdev) /* remove it from the disk list */ for (j = 0; j < NWD; j++) { struct gendisk *disk = hba[i]->gendisk[j]; - if (disk->flags & GENHD_FL_UP) - blk_cleanup_queue(disk->queue); + if (disk->flags & GENHD_FL_UP) { del_gendisk(disk); + blk_cleanup_queue(disk->queue); + } } pci_free_consistent(hba[i]->pdev, NR_CMDS * sizeof(CommandList_struct),