summaryrefslogtreecommitdiff
path: root/drivers/infiniband/sw/rxe/rxe_recv.c
diff options
context:
space:
mode:
authorZhu Yanjun <yanjun.zhu@oracle.com>2018-06-14 12:45:42 +0300
committerJason Gunthorpe <jgg@mellanox.com>2018-06-18 22:16:30 +0300
commitb90575ce7b84483d46ebedd5c164e5f274f7ce5a (patch)
tree5a297a96e7c0f1cce7a25b753b42122087024861 /drivers/infiniband/sw/rxe/rxe_recv.c
parent92cf36eec2a76d8fe61d439cd2b3ebbf33029477 (diff)
downloadlinux-b90575ce7b84483d46ebedd5c164e5f274f7ce5a.tar.xz
IB/rxe: avoid unnecessary NULL check
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> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/sw/rxe/rxe_recv.c')
-rw-r--r--drivers/infiniband/sw/rxe/rxe_recv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_recv.c b/drivers/infiniband/sw/rxe/rxe_recv.c
index 42797ac6f7b1..cc5cfd156758 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;
}