Skip to content

Commit b90575c

Browse files
Zhu Yanjunjgunthorpe
authored andcommitted
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 <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]> Reviewed-by: Yuval Shaia <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 92cf36e commit b90575c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/infiniband/sw/rxe/rxe_recv.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,7 @@ static int hdr_check(struct rxe_pkt_info *pkt)
256256
return 0;
257257

258258
err2:
259-
if (qp)
260-
rxe_drop_ref(qp);
259+
rxe_drop_ref(qp);
261260
err1:
262261
return -EINVAL;
263262
}

0 commit comments

Comments
 (0)