All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] NVMe: nvme_core_exit() should do cleanup in the reverse order as nvme_core_init does
@ 2016-04-28  8:19 Wang Sheng-Hui
  2016-05-01 18:05 ` Christoph Hellwig
  2016-05-02 15:11 ` [PATCH] NVMe: nvme_core_exit() should do cleanup in the reverse order " Jens Axboe
  0 siblings, 2 replies; 4+ messages in thread
From: Wang Sheng-Hui @ 2016-04-28  8:19 UTC (permalink / raw)


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 at foxmail.com>
---
 drivers/nvme/host/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 643f457..49bc4c0 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1607,9 +1607,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");
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-05-02 15:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-28  8:19 [PATCH] NVMe: nvme_core_exit() should do cleanup in the reverse order as nvme_core_init does Wang Sheng-Hui
2016-05-01 18:05 ` Christoph Hellwig
2016-05-02  0:18   ` [PATCH] NVMe: nvme_core_exit() should do cleanup in the reverseorder " Wang Sheng-Hui
2016-05-02 15:11 ` [PATCH] NVMe: nvme_core_exit() should do cleanup in the reverse order " Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.