Commit 2b6cabce authored by Luis Chamberlain's avatar Luis Chamberlain Committed by Jens Axboe

pcd: fix ordering of unregister_cdrom()

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: default avatarLuis Chamberlain <mcgrof@kernel.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 4dfbd139
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment