diff options
author | Andrew Boyer <andrew.boyer@dell.com> | 2016-12-22 16:54:38 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-12-22 19:36:12 +0300 |
commit | 5cc8fabc5e4c588c75a5ec21423e7c3425f69f48 (patch) | |
tree | c38c9f9bdcdb1c29b3404a752832bb55098e8a08 /drivers/infiniband/sw | |
parent | cbf1f9a46c9c5903e34b0b110ca40b1e7d4b2ab1 (diff) | |
download | linux-5cc8fabc5e4c588c75a5ec21423e7c3425f69f48.tar.xz |
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>
Diffstat (limited to 'drivers/infiniband/sw')
-rw-r--r-- | drivers/infiniband/sw/rxe/rxe_net.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c index a576603304f7..10ec699834fa 100644 --- a/drivers/infiniband/sw/rxe/rxe_net.c +++ b/drivers/infiniband/sw/rxe/rxe_net.c @@ -459,8 +459,7 @@ static int send(struct rxe_dev *rxe, struct rxe_pkt_info *pkt, return -EAGAIN; } - if (pkt->qp) - atomic_inc(&pkt->qp->skb_out); + atomic_inc(&pkt->qp->skb_out); kfree_skb(skb); return 0; |