Skip to content

Commit

Permalink
IB/rxe: avoid unnecessary NULL check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Zhu Yanjun authored and Jason Gunthorpe committed Jun 18, 2018
1 parent 92cf36e commit b90575c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/infiniband/sw/rxe/rxe_recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit b90575c

Please sign in to comment.