]> git.baikalelectronics.ru Git - kernel.git/commit
ath5k: fix error handling in ath5k_beacon_send
authorBob Copeland <me@bobcopeland.com>
Sun, 7 Aug 2011 23:36:07 +0000 (19:36 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 9 Aug 2011 20:11:33 +0000 (16:11 -0400)
commit4c652fbd8d8b70948cca8d75f536a49b93bf0165
treef67004e74a4a566c27ee5eb801a4c86b3f58ab1b
parent23b801c10a5c6ae58462278aa5fdf39db5aff7c6
ath5k: fix error handling in ath5k_beacon_send

This cleans up error handling for the beacon in case of dma mapping
failure.  We need to free the skb when dma mapping fails instead of
nulling and leaking the pointer, and we should bail out to avoid
giving the hardware the bad descriptor.

Finally, we need to perform the null check after trying to update
the beacon, or else beacons will never be sent after a single
mapping failure.

Cc: stable@kernel.org
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath5k/base.c