linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] NVMe: Fix error clean-up on nvme_alloc_queue
@ 2013-05-01 19:07 Keith Busch
  2013-05-01 19:07 ` [PATCH] NVMe: Check for NULL memory in nvme_dev_add Keith Busch
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Keith Busch @ 2013-05-01 19:07 UTC (permalink / raw)


The nvme_queue's depth is not set if we fail to allocate submission queue
entries, which was being used to determine how much coherent memory to
free on error. Use the depth variable instead.

Signed-off-by: Keith Busch <keith.busch at intel.com>
---
 drivers/block/nvme-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
index 40908a0..e78faf1 100644
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@ -956,7 +956,7 @@ static struct nvme_queue *nvme_alloc_queue(struct nvme_dev *dev, int qid,
 	return nvmeq;
 
  free_cqdma:
-	dma_free_coherent(dmadev, CQ_SIZE(nvmeq->q_depth), (void *)nvmeq->cqes,
+	dma_free_coherent(dmadev, CQ_SIZE(depth), (void *)nvmeq->cqes,
 							nvmeq->cq_dma_addr);
  free_nvmeq:
 	kfree(nvmeq);
-- 
1.7.0.4

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

end of thread, other threads:[~2013-05-01 20:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-01 19:07 [PATCH] NVMe: Fix error clean-up on nvme_alloc_queue Keith Busch
2013-05-01 19:07 ` [PATCH] NVMe: Check for NULL memory in nvme_dev_add Keith Busch
2013-05-01 19:07 ` [PATCH] NVMe: Remove dead code " Keith Busch
2013-05-01 20:30   ` Matthew Wilcox
2013-05-01 19:07 ` [PATCH] NVMe: Free allocated memory in probe failure Keith Busch
2013-05-01 19:49   ` Matthew Wilcox
2013-05-01 19:07 ` [PATCH] NVMe: Free admin queue on request_irq error Keith Busch

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).