summaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorLuis Chamberlain <mcgrof@kernel.org>2021-09-28 01:02:59 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-11-18 21:17:07 +0300
commit9d3261d4606a6d600910ec17dc592cd2b29c6ffa (patch)
treecc90592c0aa53530ea1fedeada1561b561dc4bb3 /drivers/block
parent275e4a31a82c704db79b4e233e29ac7d8d9429d7 (diff)
downloadlinux-9d3261d4606a6d600910ec17dc592cd2b29c6ffa.tar.xz
block/ataflop: use the blk_cleanup_disk() helper
[ Upstream commit 44a469b6acae6ad05c4acca8429467d1d50a8b8d ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/ataflop.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c
index 4947e41f89b7..1a908455ff96 100644
--- a/drivers/block/ataflop.c
+++ b/drivers/block/ataflop.c
@@ -2097,8 +2097,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);
}
@@ -2156,8 +2155,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);
}