From: Mike Miller Date: Tue, 13 Sep 2005 08:25:23 +0000 (-0700) Subject: [PATCH] cciss: bug fix in cciss_remove_one X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6a445d3ba6b90ce13a843ad5d1a0867388b08096;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 a12b95eef18e..49f05410a117 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),