aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 581dc9f10273..321b18b59135 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3009,14 +3009,17 @@ static int iwl_mac_offchannel_tx_cancel_wait(struct ieee80211_hw *hw)
3009 3009
3010 mutex_lock(&priv->mutex); 3010 mutex_lock(&priv->mutex);
3011 3011
3012 if (!priv->_agn.offchan_tx_skb) 3012 if (!priv->_agn.offchan_tx_skb) {
3013 return -EINVAL; 3013 ret = -EINVAL;
3014 goto unlock;
3015 }
3014 3016
3015 priv->_agn.offchan_tx_skb = NULL; 3017 priv->_agn.offchan_tx_skb = NULL;
3016 3018
3017 ret = iwl_scan_cancel_timeout(priv, 200); 3019 ret = iwl_scan_cancel_timeout(priv, 200);
3018 if (ret) 3020 if (ret)
3019 ret = -EIO; 3021 ret = -EIO;
3022unlock:
3020 mutex_unlock(&priv->mutex); 3023 mutex_unlock(&priv->mutex);
3021 3024
3022 return ret; 3025 return ret;