diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/floppy.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 401ba7833212..9baf11e86362 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c | |||
@@ -4585,6 +4585,15 @@ static void __exit floppy_module_exit(void) | |||
4585 | platform_device_unregister(&floppy_device[drive]); | 4585 | platform_device_unregister(&floppy_device[drive]); |
4586 | } | 4586 | } |
4587 | blk_cleanup_queue(disks[drive]->queue); | 4587 | blk_cleanup_queue(disks[drive]->queue); |
4588 | |||
4589 | /* | ||
4590 | * These disks have not called add_disk(). Don't put down | ||
4591 | * queue reference in put_disk(). | ||
4592 | */ | ||
4593 | if (!(allowed_drive_mask & (1 << drive)) || | ||
4594 | fdc_state[FDC(drive)].version == FDC_NONE) | ||
4595 | disks[drive]->queue = NULL; | ||
4596 | |||
4588 | put_disk(disks[drive]); | 4597 | put_disk(disks[drive]); |
4589 | } | 4598 | } |
4590 | 4599 | ||