aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r--drivers/infiniband/hw/nes/nes_verbs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
index 4dafbe16e82a..201b95ee23cb 100644
--- a/drivers/infiniband/hw/nes/nes_verbs.c
+++ b/drivers/infiniband/hw/nes/nes_verbs.c
@@ -1327,7 +1327,7 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd,
1327 (long long unsigned int)req.user_wqe_buffers); 1327 (long long unsigned int)req.user_wqe_buffers);
1328 nes_free_resource(nesadapter, nesadapter->allocated_qps, qp_num); 1328 nes_free_resource(nesadapter, nesadapter->allocated_qps, qp_num);
1329 kfree(nesqp->allocated_buffer); 1329 kfree(nesqp->allocated_buffer);
1330 return ERR_PTR(-ENOMEM); 1330 return ERR_PTR(-EFAULT);
1331 } 1331 }
1332 } 1332 }
1333 1333
@@ -1674,6 +1674,7 @@ static struct ib_cq *nes_create_cq(struct ib_device *ibdev, int entries,
1674 } 1674 }
1675 nes_debug(NES_DBG_CQ, "CQ Virtual Address = %08lX, size = %u.\n", 1675 nes_debug(NES_DBG_CQ, "CQ Virtual Address = %08lX, size = %u.\n",
1676 (unsigned long)req.user_cq_buffer, entries); 1676 (unsigned long)req.user_cq_buffer, entries);
1677 err = 1;
1677 list_for_each_entry(nespbl, &nes_ucontext->cq_reg_mem_list, list) { 1678 list_for_each_entry(nespbl, &nes_ucontext->cq_reg_mem_list, list) {
1678 if (nespbl->user_base == (unsigned long )req.user_cq_buffer) { 1679 if (nespbl->user_base == (unsigned long )req.user_cq_buffer) {
1679 list_del(&nespbl->list); 1680 list_del(&nespbl->list);
@@ -1686,7 +1687,7 @@ static struct ib_cq *nes_create_cq(struct ib_device *ibdev, int entries,
1686 if (err) { 1687 if (err) {
1687 nes_free_resource(nesadapter, nesadapter->allocated_cqs, cq_num); 1688 nes_free_resource(nesadapter, nesadapter->allocated_cqs, cq_num);
1688 kfree(nescq); 1689 kfree(nescq);
1689 return ERR_PTR(err); 1690 return ERR_PTR(-EFAULT);
1690 } 1691 }
1691 1692
1692 pbl_entries = nespbl->pbl_size >> 3; 1693 pbl_entries = nespbl->pbl_size >> 3;