diff options
author | Luis Chamberlain <mcgrof@kernel.org> | 2021-09-27 15:02:59 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-10-18 14:41:37 -0600 |
commit | 44a469b6acae6ad05c4acca8429467d1d50a8b8d (patch) | |
tree | 689e71b78e8b571498e5ec9983af402af1a2ef57 /drivers/block/ataflop.c | |
parent | 625a28a7e60c7c026e4d2929c49c8461fad4b0f3 (diff) |
block/ataflop: use the blk_cleanup_disk() helper
Use the helper to replace two lines with one.
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Link: https://lore.kernel.org/r/20210927220302.1073499-12-mcgrof@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/ataflop.c')
-rw-r--r-- | drivers/block/ataflop.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c index 58e921ab5729..bc8cf7a991af 100644 --- a/drivers/block/ataflop.c +++ b/drivers/block/ataflop.c @@ -2077,8 +2077,7 @@ static int __init atari_floppy_init (void) err: while (--i >= 0) { - blk_cleanup_queue(unit[i].disk[0]->queue); - put_disk(unit[i].disk[0]); + blk_cleanup_disk(unit[i].disk[0]); blk_mq_free_tag_set(&unit[i].tag_set); } @@ -2136,8 +2135,7 @@ static void __exit atari_floppy_exit(void) if (!unit[i].disk[type]) continue; del_gendisk(unit[i].disk[type]); - blk_cleanup_queue(unit[i].disk[type]->queue); - put_disk(unit[i].disk[type]); + blk_cleanup_disk(unit[i].disk[type]); } blk_mq_free_tag_set(&unit[i].tag_set); } |