提交 23bd63ce 编写于 作者: W Wang Sheng-Hui 提交者: Jens Axboe

NVMe: nvme_core_exit() should do cleanup in the reverse order as nvme_core_init does

nvme_core_init does:
    1) register_blkdev
    2) __register_chrdev
    3) class_create

nvme_core_exit should do cleanup in the reverse order.
Signed-off-by: NWang Sheng-Hui <shhuiw@foxmail.com>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NJens Axboe <axboe@fb.com>
上级 3b24774e
......@@ -1715,9 +1715,9 @@ int __init nvme_core_init(void)
void nvme_core_exit(void)
{
unregister_blkdev(nvme_major, "nvme");
class_destroy(nvme_class);
__unregister_chrdev(nvme_char_major, 0, NVME_MINORS, "nvme");
unregister_blkdev(nvme_major, "nvme");
}
MODULE_LICENSE("GPL");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册