bna: Add NULL Check Before Dereferencing TCB
authorRasesh Mody <rmody@brocade.com>
Wed, 18 Dec 2013 01:07:38 +0000 (17:07 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Dec 2013 05:30:34 +0000 (00:30 -0500)
commit96e31adf8d73f10bd2b616a17bd8af0d53e9da33
tree1465a56068a7fdc123b2be2142e4f67cbe4466d3
parent17a30a14db09dfe9d3302f8a2d50571b0d94b144
bna: Add NULL Check Before Dereferencing TCB

Currently we already check to see whether the BNAD_TXQ_TX_STARTED cleared.
But if the tcb structure which contains this flag is also already freed by that
time, we would dereference the NULL pointer. This patch is to check tcb for NULL
pointer, before dereferencing it.

Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/brocade/bna/bnad.c