Message ID | 1528969542-19870-1-git-send-email-yanjun.zhu@oracle.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Jason Gunthorpe |
Headers | show |
On Thu, Jun 14, 2018 at 05:45:42AM -0400, Zhu Yanjun wrote: > Before goto err2, the variable qp is checked. So it is not necessary > to check qp in label err2. > > Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com> > --- > drivers/infiniband/sw/rxe/rxe_recv.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > Thanks, Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
On Thu, Jun 14, 2018 at 05:45:42AM -0400, Yanjun Zhu wrote: > Before goto err2, the variable qp is checked. So it is not necessary > to check qp in label err2. > > Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com> > --- > drivers/infiniband/sw/rxe/rxe_recv.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/infiniband/sw/rxe/rxe_recv.c b/drivers/infiniband/sw/rxe/rxe_recv.c > index dfba44a..b0c8d1e 100644 > --- a/drivers/infiniband/sw/rxe/rxe_recv.c > +++ b/drivers/infiniband/sw/rxe/rxe_recv.c > @@ -256,8 +256,7 @@ static int hdr_check(struct rxe_pkt_info *pkt) > return 0; > > err2: > - if (qp) > - rxe_drop_ref(qp); > + rxe_drop_ref(qp); Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com> > err1: > return -EINVAL; > } > -- > 2.7.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Jun 14, 2018 at 05:45:42AM -0400, Zhu Yanjun wrote: > Before goto err2, the variable qp is checked. So it is not necessary > to check qp in label err2. > > Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com> > Reviewed-by: Leon Romanovsky <leonro@mellanox.com> > Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com> > --- > drivers/infiniband/sw/rxe/rxe_recv.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Applied to for-next Thanks, Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/infiniband/sw/rxe/rxe_recv.c b/drivers/infiniband/sw/rxe/rxe_recv.c index dfba44a..b0c8d1e 100644 --- a/drivers/infiniband/sw/rxe/rxe_recv.c +++ b/drivers/infiniband/sw/rxe/rxe_recv.c @@ -256,8 +256,7 @@ static int hdr_check(struct rxe_pkt_info *pkt) return 0; err2: - if (qp) - rxe_drop_ref(qp); + rxe_drop_ref(qp); err1: return -EINVAL; }
Before goto err2, the variable qp is checked. So it is not necessary to check qp in label err2. Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com> --- drivers/infiniband/sw/rxe/rxe_recv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)