lkml.org 
[lkml]   [2020]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] RDMA/rvt: Improve exception handling in rvt_create_qp()
From
Date
> … The patch fixes this issue by
> calling rvt_free_rq().

I suggest to choose another imperative wording for your change description.
Will the tag “Fixes” become helpful for the commit message?


> +++ b/drivers/infiniband/sw/rdmavt/qp.c
> @@ -1203,6 +1203,7 @@ struct ib_qp *rvt_create_qp(struct ib_pd *ibpd,
> qp->s_flags = RVT_S_SIGNAL_REQ_WR;
> err = alloc_ud_wq_attr(qp, rdi->dparms.node);
> if (err) {
> + rvt_free_rq(&qp->r_rq);
> ret = (ERR_PTR(err));
> goto bail_driver_priv;
> }

How do you think about the following code variant with the addition
of a jump target?

err = alloc_ud_wq_attr(qp, rdi->dparms.node);
if (err) {
ret = (ERR_PTR(err));
- goto bail_driver_priv;
+ goto bail_free_rq;
}



bail_rq_wq:
- rvt_free_rq(&qp->r_rq);
free_ud_wq_attr(qp);
+
+bail_free_rq:
+ rvt_free_rq(&qp->r_rq);

bail_driver_priv:


Regards,
Markus

\
 
 \ /
  Last update: 2020-06-13 09:15    [W:0.056 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site