diff options
-rw-r--r-- | drivers/block/nvme-core.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c index 358d17700c20..391a874e4133 100644 --- a/drivers/block/nvme-core.c +++ b/drivers/block/nvme-core.c | |||
@@ -1054,14 +1054,19 @@ static int nvme_configure_admin_queue(struct nvme_dev *dev) | |||
1054 | } | 1054 | } |
1055 | } | 1055 | } |
1056 | 1056 | ||
1057 | if (result) { | 1057 | if (result) |
1058 | nvme_free_queue_mem(nvmeq); | 1058 | goto free_q; |
1059 | return result; | ||
1060 | } | ||
1061 | 1059 | ||
1062 | result = queue_request_irq(dev, nvmeq, "nvme admin"); | 1060 | result = queue_request_irq(dev, nvmeq, "nvme admin"); |
1061 | if (result) | ||
1062 | goto free_q; | ||
1063 | |||
1063 | dev->queues[0] = nvmeq; | 1064 | dev->queues[0] = nvmeq; |
1064 | return result; | 1065 | return result; |
1066 | |||
1067 | free_q: | ||
1068 | nvme_free_queue_mem(nvmeq); | ||
1069 | return result; | ||
1065 | } | 1070 | } |
1066 | 1071 | ||
1067 | struct nvme_iod *nvme_map_user_pages(struct nvme_dev *dev, int write, | 1072 | struct nvme_iod *nvme_map_user_pages(struct nvme_dev *dev, int write, |