All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 1/3] lightnvm: check mm before use
@ 2015-12-02 12:16 Matias Bjørling
  2015-12-02 12:16 ` [PATCH RFC 2/3] lightnvm: comments on constants Matias Bjørling
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Matias Bjørling @ 2015-12-02 12:16 UTC (permalink / raw)
  To: linux-block, linux-kernel; +Cc: Matias Bjørling

The core can initialize I/Os before a media manager is registered with
the lightnvm subsystem. Make sure that we don't call the media manager
prematurely.

Signed-off-by: Matias Bjørling <m@bjorling.me>
---
 drivers/nvme/host/lightnvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c
index 06c3364..762c9a7 100644
--- a/drivers/nvme/host/lightnvm.c
+++ b/drivers/nvme/host/lightnvm.c
@@ -455,7 +455,7 @@ static void nvme_nvm_end_io(struct request *rq, int error)
 	struct nvm_rq *rqd = rq->end_io_data;
 	struct nvm_dev *dev = rqd->dev;
 
-	if (dev->mt->end_io(rqd, error))
+	if (dev->mt && dev->mt->end_io(rqd, error))
 		pr_err("nvme: err status: %x result: %lx\n",
 				rq->errors, (unsigned long)rq->special);
 
-- 
2.1.4


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

end of thread, other threads:[~2015-12-04 10:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-02 12:16 [PATCH RFC 1/3] lightnvm: check mm before use Matias Bjørling
2015-12-02 12:16 ` [PATCH RFC 2/3] lightnvm: comments on constants Matias Bjørling
2015-12-02 12:16 ` [PATCH RFC 3/3] lightnvm: fix media mgr registration Matias Bjørling
2015-12-04  8:40   ` Wenwei Tao
2015-12-04 10:46     ` Matias Bjørling
2015-12-04  8:02 ` [PATCH RFC 1/3] lightnvm: check mm before use Wenwei Tao
2015-12-04  9:51   ` Matias Bjørling

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.