]> Pileus Git - ~andy/linux/blobdiff - drivers/net/wireless/iwlwifi/iwl-agn.c
Merge branch 'master' into for-next
[~andy/linux] / drivers / net / wireless / iwlwifi / iwl-agn.c
index 31233a330372b905cfde829b606b6ee3473d706a..d1e2eb9d76bc58f55d445d89ea6067295e2b88e1 100644 (file)
@@ -3009,14 +3009,17 @@ static int iwl_mac_offchannel_tx_cancel_wait(struct ieee80211_hw *hw)
 
        mutex_lock(&priv->mutex);
 
-       if (!priv->_agn.offchan_tx_skb)
-               return -EINVAL;
+       if (!priv->_agn.offchan_tx_skb) {
+               ret = -EINVAL;
+               goto unlock;
+       }
 
        priv->_agn.offchan_tx_skb = NULL;
 
        ret = iwl_scan_cancel_timeout(priv, 200);
        if (ret)
                ret = -EIO;
+unlock:
        mutex_unlock(&priv->mutex);
 
        return ret;