Skip to content

Commit

Permalink
pcd: fix ordering of unregister_cdrom()
Browse files Browse the repository at this point in the history
We first register cdrom and then we add_disk() and
so we we should likewise unregister the cdrom first and
then del_gendisk().

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Luis Chamberlain authored and Jens Axboe committed Oct 18, 2021
1 parent 4dfbd13 commit 2b6cabc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/block/paride/pcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1021,9 +1021,9 @@ static void __exit pcd_exit(void)
if (!cd->present)
continue;

unregister_cdrom(&cd->info);
del_gendisk(cd->disk);
pi_release(cd->pi);
unregister_cdrom(&cd->info);
blk_cleanup_disk(cd->disk);

blk_mq_free_tag_set(&cd->tag_set);
Expand Down

0 comments on commit 2b6cabc

Please sign in to comment.