* [PATCH] NVMe: Fix nvme module init when nvme_major is set
@ 2012-07-25 22:05 Keith Busch
2012-07-26 16:23 ` Matthew Wilcox
0 siblings, 1 reply; 2+ messages in thread
From: Keith Busch @ 2012-07-25 22:05 UTC (permalink / raw)
register_blkdev returns 0 when given a valid major number.
Reported-by:Ross Zwisler <ross.zwisler at intel.com>
Signed-off-by: Keith Busch <keith.busch at intel.com>
---
drivers/block/nvme.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/block/nvme.c b/drivers/block/nvme.c
index 38b9c73..46e33ee 100644
--- a/drivers/block/nvme.c
+++ b/drivers/block/nvme.c
@@ -1716,9 +1716,11 @@ static int __init nvme_init(void)
if (IS_ERR(nvme_thread))
return PTR_ERR(nvme_thread);
- nvme_major = register_blkdev(nvme_major, "nvme");
- if (nvme_major <= 0)
+ result = register_blkdev(nvme_major, "nvme");
+ if (result < 0)
goto kill_kthread;
+ else if (result > 0)
+ nvme_major = result;
result = pci_register_driver(&nvme_driver);
if (result)
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] NVMe: Fix nvme module init when nvme_major is set
2012-07-25 22:05 [PATCH] NVMe: Fix nvme module init when nvme_major is set Keith Busch
@ 2012-07-26 16:23 ` Matthew Wilcox
0 siblings, 0 replies; 2+ messages in thread
From: Matthew Wilcox @ 2012-07-26 16:23 UTC (permalink / raw)
On Wed, Jul 25, 2012@04:05:18PM -0600, Keith Busch wrote:
> register_blkdev returns 0 when given a valid major number.
Thanks, applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-26 16:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-25 22:05 [PATCH] NVMe: Fix nvme module init when nvme_major is set Keith Busch
2012-07-26 16:23 ` Matthew Wilcox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).