summaryrefslogtreecommitdiff
path: root/drivers/nvme
diff options
context:
space:
mode:
authorWang Sheng-Hui <shhuiw@foxmail.com>2016-04-28 11:19:31 +0300
committerJens Axboe <axboe@fb.com>2016-05-02 18:05:03 +0300
commit23bd63ceea30878758c303baaf9f8e28f299c578 (patch)
tree373bab032999a0e13188b7b2f0fe391b6374d41a /drivers/nvme
parent3b24774e1fb90a40836e96e39a851a774679efff (diff)
downloadlinux-23bd63ceea30878758c303baaf9f8e28f299c578.tar.xz
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.c2
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");