@@ -4953,19 +4953,6 @@ static void __exit floppy_module_exit(void)
blk_cleanup_queue(disks[drive][i]->queue);
}
blk_mq_free_tag_set(&tag_sets[drive]);
-
- /*
- * These disks have not called add_disk(). Don't put down
- * queue reference in put_disk().
- */
- if (!(allowed_drive_mask & (1 << drive)) ||
- fdc_state[FDC(drive)].version == FDC_NONE) {
- for (i = 0; i < ARRAY_SIZE(floppy_type); i++) {
- if (disks[drive][i])
- disks[drive][i]->queue = NULL;
- }
- }
-
for (i = 0; i < ARRAY_SIZE(floppy_type); i++) {
if (disks[drive][i])
put_disk(disks[drive][i]);
Even if the queue was cleaned up on exit, putting the disk *is* still required, and likewise, blk_cleanup_queue() on a null queue should be a no-op now, after the patch titled "block: skip queue if NULL on blk_cleanup_queue()" so it is safe to use even if the queue is NULL. Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> --- drivers/block/floppy.c | 13 ------------- 1 file changed, 13 deletions(-)