summaryrefslogtreecommitdiffstats
path: root/drivers/net/bna
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-09-12 21:06:00 +0200
committerDavid S. Miller <davem@davemloft.net>2010-09-12 21:06:00 +0200
commit0ea05ce7fd0c1286759933933764aacd12f6ac3a (patch)
tree84245f1ebbab408d95028e5a42430a8388c2ce75 /drivers/net/bna
parentpkt_sched: remov unnecessary bh_disable (diff)
downloadlinux-0ea05ce7fd0c1286759933933764aacd12f6ac3a.tar.xz
linux-0ea05ce7fd0c1286759933933764aacd12f6ac3a.zip
bna: Check for NULL before deref in bnad_cb_tx_cleanup
Reported-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bna')
-rw-r--r--drivers/net/bna/bnad.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/bna/bnad.c b/drivers/net/bna/bnad.c
index 8158fb93cb4c..e380c0e88f4f 100644
--- a/drivers/net/bna/bnad.c
+++ b/drivers/net/bna/bnad.c
@@ -867,11 +867,12 @@ bnad_cb_tx_resume(struct bnad *bnad, struct bna_tcb *tcb)
static void
bnad_cb_tx_cleanup(struct bnad *bnad, struct bna_tcb *tcb)
{
- struct bnad_unmap_q *unmap_q = tcb->unmap_q;
+ struct bnad_unmap_q *unmap_q;
if (!tcb || (!tcb->unmap_q))
return;
+ unmap_q = tcb->unmap_q;
if (!unmap_q->unmap_array)
return;