On 7/17/23 14:55, Christophe JAILLET wrote: > All errors go to the error handling path, except this one. Be consistent > and also branch to it. > > Fixes: 02ed253770fb ("RDMA/rxe: Introduce rxe access supported flags") > Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx> > --- > /!\ Speculative /!\ > > This patch is based on analysis of the surrounding code and should be > reviewed with care ! > > /!\ Speculative /!\ > --- > drivers/infiniband/sw/rxe/rxe_mw.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/infiniband/sw/rxe/rxe_mw.c b/drivers/infiniband/sw/rxe/rxe_mw.c > index d8a43d87de93..d9312b5c9d20 100644 > --- a/drivers/infiniband/sw/rxe/rxe_mw.c > +++ b/drivers/infiniband/sw/rxe/rxe_mw.c > @@ -199,7 +199,8 @@ int rxe_bind_mw(struct rxe_qp *qp, struct rxe_send_wqe *wqe) > > if (access & ~RXE_ACCESS_SUPPORTED_MW) { > rxe_err_mw(mw, "access %#x not supported", access); > - return -EOPNOTSUPP; > + ret = -EOPNOTSUPP; > + goto err_drop_mr; > } > > spin_lock_bh(&mw->lock); Christophe, Good catch. Thanks. Probably should go to for-next. Bob Reviewed-by: Bob Pearson <rpearsonhpe@xxxxxxxxx>