aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/nvme.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/block/nvme.c b/drivers/block/nvme.c
index d1cd91becdb0..843edbd79c56 100644
--- a/drivers/block/nvme.c
+++ b/drivers/block/nvme.c
@@ -892,7 +892,7 @@ static __devinit struct nvme_queue *nvme_create_queue(struct nvme_dev *dev,
892 struct nvme_queue *nvmeq = nvme_alloc_queue(dev, qid, cq_size, vector); 892 struct nvme_queue *nvmeq = nvme_alloc_queue(dev, qid, cq_size, vector);
893 893
894 if (!nvmeq) 894 if (!nvmeq)
895 return NULL; 895 return ERR_PTR(-ENOMEM);
896 896
897 result = adapter_alloc_cq(dev, qid, nvmeq); 897 result = adapter_alloc_cq(dev, qid, nvmeq);
898 if (result < 0) 898 if (result < 0)
@@ -918,7 +918,7 @@ static __devinit struct nvme_queue *nvme_create_queue(struct nvme_dev *dev,
918 dma_free_coherent(nvmeq->q_dmadev, SQ_SIZE(nvmeq->q_depth), 918 dma_free_coherent(nvmeq->q_dmadev, SQ_SIZE(nvmeq->q_depth),
919 nvmeq->sq_cmds, nvmeq->sq_dma_addr); 919 nvmeq->sq_cmds, nvmeq->sq_dma_addr);
920 kfree(nvmeq); 920 kfree(nvmeq);
921 return NULL; 921 return ERR_PTR(result);
922} 922}
923 923
924static int __devinit nvme_configure_admin_queue(struct nvme_dev *dev) 924static int __devinit nvme_configure_admin_queue(struct nvme_dev *dev)
@@ -1421,8 +1421,8 @@ static int __devinit nvme_setup_io_queues(struct nvme_dev *dev)
1421 for (i = 0; i < nr_io_queues; i++) { 1421 for (i = 0; i < nr_io_queues; i++) {
1422 dev->queues[i + 1] = nvme_create_queue(dev, i + 1, 1422 dev->queues[i + 1] = nvme_create_queue(dev, i + 1,
1423 NVME_Q_DEPTH, i); 1423 NVME_Q_DEPTH, i);
1424 if (!dev->queues[i + 1]) 1424 if (IS_ERR(dev->queues[i + 1]))
1425 return -ENOMEM; 1425 return PTR_ERR(dev->queues[i + 1]);
1426 dev->queue_count++; 1426 dev->queue_count++;
1427 } 1427 }
1428 1428