[PATCH 07/12] block/swim: Remove extra put_disk() call from error path
From: Finn Thain
Date: Sat Mar 31 2018 - 21:42:40 EST
Cc: Laurent Vivier <lvivier@xxxxxxxxxx>
Cc: Jens Axboe <axboe@xxxxxxxxx>
Tested-by: Stan Johnson <userm57@xxxxxxxxx>
Signed-off-by: Finn Thain <fthain@xxxxxxxxxxxxxxxxxxx>
---
drivers/block/swim.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index 87c70fcce875..19d7d27468c7 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -873,7 +873,6 @@ static int swim_floppy_init(struct swim_priv *swd)
&swd->lock);
if (!swd->unit[drive].disk->queue) {
err = -ENOMEM;
- put_disk(swd->unit[drive].disk);
goto exit_put_disks;
}
blk_queue_bounce_limit(swd->unit[drive].disk->queue,
--
2.16.1