]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
RDMA/cxgb3: Handle build_phys_page_list() failure in iwch_reregister_phys_mem()
authorSteve Wise <swise@opengridcomputing.com>
Thu, 22 Mar 2007 15:38:20 +0000 (10:38 -0500)
committerRoland Dreier <rolandd@cisco.com>
Thu, 22 Mar 2007 21:40:16 +0000 (14:40 -0700)
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/cxgb3/iwch_provider.c

index f2774ae906bf66f9ac8d55a298b43e0bc7486ea1..24e0df04f7dbcc01310666924db6cc3204c4ee7f 100644 (file)
@@ -545,11 +545,14 @@ static int iwch_reregister_phys_mem(struct ib_mr *mr,
                php = to_iwch_pd(pd);
        if (mr_rereg_mask & IB_MR_REREG_ACCESS)
                mh.attr.perms = iwch_ib_to_tpt_access(acc);
-       if (mr_rereg_mask & IB_MR_REREG_TRANS)
+       if (mr_rereg_mask & IB_MR_REREG_TRANS) {
                ret = build_phys_page_list(buffer_list, num_phys_buf,
                                           iova_start,
                                           &total_size, &npages,
                                           &shift, &page_list);
+               if (ret)
+                       return ret;
+       }
 
        ret = iwch_reregister_mem(rhp, php, &mh, shift, page_list, npages);
        kfree(page_list);