]> git.baikalelectronics.ru Git - kernel.git/commit
ath5k: remove some unneeded error handling code
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 5 Oct 2011 05:46:37 +0000 (08:46 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 11 Oct 2011 20:41:09 +0000 (16:41 -0400)
commit002ebe6b6559f16c5c9dd0d1c95a17c5242f11ff
tree78545c895b288dce13188e2347abc2aa0299a20f
parent81ee2fd9576c6c9820b1c29cd270c18dc8342a1f
ath5k: remove some unneeded error handling code

th5k_hw_setup_tx_queue() returns a valid offset into the ah->ah_txq[]
array.  The ah->ah_txq[] and the ah->txqs[] array are the same size.
Both have AR5K_NUM_TX_QUEUES elements.  So this error handling code
will never trigger.

Also it's wrong.  The call to ath5k_hw_release_tx_queue() with a qnum
of AR5K_NUM_TX_QUEUES or more will just trigger a WARN_ON() and
return.  Or if it missed the WARN_ON(), it would just corrupt some
memory and return.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath5k/base.c