From: Wang Sheng-Hui Date: Thu, 28 Apr 2016 08:19:31 +0000 (+0800) Subject: NVMe: nvme_core_exit() should do cleanup in the reverse order as nvme_core_init does X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=23bd63ceea30878758c303baaf9f8e28f299c578;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe --- 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");