staging/rdma/hfi1: Clean up return handling
authorDennis Dalessandro <dennis.dalessandro@intel.com>
Tue, 19 Jan 2016 22:43:28 +0000 (14:43 -0800)
committerDoug Ledford <dledford@redhat.com>
Fri, 11 Mar 2016 01:37:42 +0000 (20:37 -0500)
Return directly from rvt_resize_cq rather than use a goto/label.

Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Harish Chegondi <harish.chegondi@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/rdmavt/cq.c

index 055aa71bed185904bf250eb6fde633d589576a1b..0e6dbe5904ff21f540347fdf23bb330a5319a3be 100644 (file)
@@ -432,7 +432,7 @@ int rvt_resize_cq(struct ib_cq *ibcq, int cqe, struct ib_udata *udata)
                        ret = ib_copy_to_udata(udata, &ip->offset,
                                               sizeof(ip->offset));
                        if (ret)
-                               goto bail;
+                               return ret;
                }
 
                spin_lock_irq(&rdi->pending_lock);
@@ -447,9 +447,7 @@ bail_unlock:
        spin_unlock_irq(&cq->lock);
 bail_free:
        vfree(wc);
-bail:
        return ret;
-
 }
 
 /**