Skip to content

Commit 5cc8fab

Browse files
Andrew Boyerdledford
authored andcommitted
IB/rxe: Don't check for null ptr in send()
pkt->qp was already dereferenced earlier in the function. Fixes Smatch complaint: drivers/infiniband/sw/rxe/rxe_net.c:458 send() warn: variable dereferenced before check 'pkt->qp' (see line 441) Signed-off-by: Andrew Boyer <andrew.boyer@dell.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
1 parent cbf1f9a commit 5cc8fab

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/infiniband/sw/rxe/rxe_net.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,7 @@ static int send(struct rxe_dev *rxe, struct rxe_pkt_info *pkt,
459459
return -EAGAIN;
460460
}
461461

462-
if (pkt->qp)
463-
atomic_inc(&pkt->qp->skb_out);
462+
atomic_inc(&pkt->qp->skb_out);
464463
kfree_skb(skb);
465464

466465
return 0;

0 commit comments

Comments
 (0)