Skip to content

Commit

Permalink
block/ataflop: use the blk_cleanup_disk() helper
Browse files Browse the repository at this point in the history
[ Upstream commit 44a469b ]

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>
  • Loading branch information
mcgrof authored and gregkh committed Nov 18, 2021
1 parent 275e4a3 commit 9d3261d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/block/ataflop.c
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 9d3261d

Please sign in to comment.