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)
commitbdc71bc59231f5542af13b5061b9ab124d093050
treef67004e74a4a566c27ee5eb801a4c86b3f58ab1b
parent276b02e2a0ada2e0196852c312560ffdabcebddc
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