bna: Handle the TX Setup Failures
authorRasesh Mody <rmody@brocade.com>
Wed, 18 Dec 2013 01:07:39 +0000 (17:07 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Dec 2013 05:30:34 +0000 (00:30 -0500)
commitf29eeb79ac993a7f1d9e1be5f8c7c3684be0721d
tree23a257081ba5b61d8dcd0a6c86da0b81ff6e7722
parent96e31adf8d73f10bd2b616a17bd8af0d53e9da33
bna: Handle the TX Setup Failures

Change details:
 - When bnad_setup_tx() returns NULL, the error is NOT returned to the caller.
   The caller will incorrectly assume success. So Return ENOMEM when bna_tx_create()
   fails.
 - If bnad_tx_msix_register() fails, call bna_tx_destroy() to free tx & to NULL
   the bnad reference to tcb.

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