diff options
author | Wang Sheng-Hui <shhuiw@foxmail.com> | 2016-04-28 10:19:31 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-05-02 17:05:03 +0200 |
commit | 23bd63ceea30878758c303baaf9f8e28f299c578 (patch) | |
tree | 373bab032999a0e13188b7b2f0fe391b6374d41a /drivers/nvme | |
parent | NVMe: Fix check_flush_dependency warning (diff) | |
download | linux-23bd63ceea30878758c303baaf9f8e28f299c578.tar.xz linux-23bd63ceea30878758c303baaf9f8e28f299c578.zip |
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: Wang Sheng-Hui <shhuiw@foxmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 4eb575933587..20559ad98be1 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -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"); |