Commit 0eddb519b9127c73d53db4bf3ec1d45b13f844d1

Authored by Linus Torvalds

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

Showing 4 changed files Side-by-side Diff

drivers/infiniband/core/cm.c
... ... @@ -3694,7 +3694,7 @@
3694 3694 cm_dev->device = device_create(&cm_class, &ib_device->dev,
3695 3695 MKDEV(0, 0), NULL,
3696 3696 "%s", ib_device->name);
3697   - if (!cm_dev->device) {
  3697 + if (IS_ERR(cm_dev->device)) {
3698 3698 kfree(cm_dev);
3699 3699 return;
3700 3700 }
drivers/infiniband/core/cma.c
... ... @@ -1684,6 +1684,7 @@
1684 1684 }
1685 1685  
1686 1686 memcpy(id->route.path_rec, path_rec, sizeof *path_rec * num_paths);
  1687 + id->route.num_paths = num_paths;
1687 1688 return 0;
1688 1689 err:
1689 1690 cma_comp_exch(id_priv, CMA_ROUTE_RESOLVED, CMA_ADDR_RESOLVED);
drivers/infiniband/hw/mlx4/mr.c
... ... @@ -240,7 +240,7 @@
240 240 mfrpl->mapped_page_list = dma_alloc_coherent(&dev->dev->pdev->dev,
241 241 size, &mfrpl->map,
242 242 GFP_KERNEL);
243   - if (!mfrpl->ibfrpl.page_list)
  243 + if (!mfrpl->mapped_page_list)
244 244 goto err_free;
245 245  
246 246 WARN_ON(mfrpl->map & 0x3f);
drivers/infiniband/hw/nes/nes_verbs.c
... ... @@ -2821,11 +2821,10 @@
2821 2821 attr->cap.max_send_wr = nesqp->hwqp.sq_size;
2822 2822 attr->cap.max_recv_wr = nesqp->hwqp.rq_size;
2823 2823 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;
2829 2828  
2830 2829 init_attr->event_handler = nesqp->ibqp.event_handler;
2831 2830 init_attr->qp_context = nesqp->ibqp.qp_context;