Skip to content

Commit 0eddb51

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: IB/mlx4: Check correct variable for allocation failure RDMA/nes: Correct cap.max_inline_data assignment in nes_query_qp() RDMA/cm: Set num_paths when manually assigning path records IB/cm: Fix device_create() return value check
2 parents f163937 + 5091b35 commit 0eddb51

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

drivers/infiniband/core/cm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3694,7 +3694,7 @@ static void cm_add_one(struct ib_device *ib_device)
36943694
cm_dev->device = device_create(&cm_class, &ib_device->dev,
36953695
MKDEV(0, 0), NULL,
36963696
"%s", ib_device->name);
3697-
if (!cm_dev->device) {
3697+
if (IS_ERR(cm_dev->device)) {
36983698
kfree(cm_dev);
36993699
return;
37003700
}

drivers/infiniband/core/cma.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1684,6 +1684,7 @@ int rdma_set_ib_paths(struct rdma_cm_id *id,
16841684
}
16851685

16861686
memcpy(id->route.path_rec, path_rec, sizeof *path_rec * num_paths);
1687+
id->route.num_paths = num_paths;
16871688
return 0;
16881689
err:
16891690
cma_comp_exch(id_priv, CMA_ROUTE_RESOLVED, CMA_ADDR_RESOLVED);

drivers/infiniband/hw/mlx4/mr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ struct ib_fast_reg_page_list *mlx4_ib_alloc_fast_reg_page_list(struct ib_device
240240
mfrpl->mapped_page_list = dma_alloc_coherent(&dev->dev->pdev->dev,
241241
size, &mfrpl->map,
242242
GFP_KERNEL);
243-
if (!mfrpl->ibfrpl.page_list)
243+
if (!mfrpl->mapped_page_list)
244244
goto err_free;
245245

246246
WARN_ON(mfrpl->map & 0x3f);

drivers/infiniband/hw/nes/nes_verbs.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2821,11 +2821,10 @@ static int nes_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
28212821
attr->cap.max_send_wr = nesqp->hwqp.sq_size;
28222822
attr->cap.max_recv_wr = nesqp->hwqp.rq_size;
28232823
attr->cap.max_recv_sge = 1;
2824-
if (nes_drv_opt & NES_DRV_OPT_NO_INLINE_DATA) {
2825-
init_attr->cap.max_inline_data = 0;
2826-
} else {
2827-
init_attr->cap.max_inline_data = 64;
2828-
}
2824+
if (nes_drv_opt & NES_DRV_OPT_NO_INLINE_DATA)
2825+
attr->cap.max_inline_data = 0;
2826+
else
2827+
attr->cap.max_inline_data = 64;
28292828

28302829
init_attr->event_handler = nesqp->ibqp.event_handler;
28312830
init_attr->qp_context = nesqp->ibqp.qp_context;

0 commit comments

Comments
 (0)