@@ -306,8 +306,10 @@ void ath_paprd_calibrate(struct work_struct *work)
init_completion(&sc->paprd_complete);
ar9003_paprd_setup_gain_table(ah, chain);
txctl.paprd = BIT(chain);
- if (ath_tx_start(hw, skb, &txctl) != 0)
+ if (ath_tx_start(hw, skb, &txctl) != 0) {
+ kfree_skb(skb);
break;
+ }
time_left = wait_for_completion_timeout(&sc->paprd_complete,
100);
@@ -327,7 +329,6 @@ void ath_paprd_calibrate(struct work_struct *work)
chain_ok = 1;
}
- kfree_skb(skb);
if (chain_ok) {
ah->curchan->paprd_done = true;
@@ -1946,6 +1946,7 @@ static void ath_tx_complete_buf(struct ath_softc *sc, struct ath_buf *bf,
if (bf->bf_state.bfs_paprd) {
sc->paprd_txok = txok;
complete(&sc->paprd_complete);
+ dev_kfree_skb_any(skb);
} else {
ath_tx_complete(sc, skb, bf->aphy, tx_flags);
ath_debug_stat_tx(sc, txq, bf, ts);