summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/block/floppy.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index 83112f08a41d..9a558b63e78f 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -4150,6 +4150,7 @@ static int __init do_floppy_init(void)
disks[dr]->queue = blk_init_queue(do_fd_request, &floppy_lock);
if (!disks[dr]->queue) {
+ put_disk(disks[dr]);
err = -ENOMEM;
goto out_put_disk;
}