aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw/rxe
diff options
context:
space:
mode:
authorZhu Yanjun <yanjun.zhu@oracle.com>2018-06-14 05:45:42 -0400
committerJason Gunthorpe <jgg@mellanox.com>2018-06-18 13:16:30 -0600
commitb90575ce7b84483d46ebedd5c164e5f274f7ce5a (patch)
tree5a297a96e7c0f1cce7a25b753b42122087024861 /drivers/infiniband/sw/rxe
parentIB/rxe: support for 802.1q VLAN on the listener (diff)
downloadlinux-dev-b90575ce7b84483d46ebedd5c164e5f274f7ce5a.tar.xz
linux-dev-b90575ce7b84483d46ebedd5c164e5f274f7ce5a.zip
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')
-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;
}