diff options
author | Allen Hubbe <Allen.Hubbe@emc.com> | 2015-07-13 08:07:14 -0400 |
---|---|---|
committer | Jon Mason <jdmason@kudzu.us> | 2015-08-09 16:32:22 -0400 |
commit | 30a4bb1e5a9d7e283af6e29da09362104b67d7aa (patch) | |
tree | 406f81ed8d099e0f75e70d8fbf0dd0d3952f82d7 /drivers/ntb | |
parent | 8c9edf63e75f036b42afb4502deb20bbfb5004b4 (diff) |
NTB: Fix dereference before check
Remove early dereference of a pointer that is checked later in the code.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Allen Hubbe <Allen.Hubbe@emc.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Diffstat (limited to 'drivers/ntb')
-rw-r--r-- | drivers/ntb/ntb_transport.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/ntb/ntb_transport.c b/drivers/ntb/ntb_transport.c index bc556e2d7f62..1c6386d5f79c 100644 --- a/drivers/ntb/ntb_transport.c +++ b/drivers/ntb/ntb_transport.c @@ -1692,7 +1692,6 @@ EXPORT_SYMBOL_GPL(ntb_transport_create_queue); */ void ntb_transport_free_queue(struct ntb_transport_qp *qp) { - struct ntb_transport_ctx *nt = qp->transport; struct pci_dev *pdev; struct ntb_queue_entry *entry; u64 qp_bit; @@ -1745,7 +1744,7 @@ void ntb_transport_free_queue(struct ntb_transport_qp *qp) while ((entry = ntb_list_rm(&qp->ntb_tx_free_q_lock, &qp->tx_free_q))) kfree(entry); - nt->qp_bitmap_free |= qp_bit; + qp->transport->qp_bitmap_free |= qp_bit; dev_info(&pdev->dev, "NTB Transport QP %d freed\n", qp->qp_num); } |