forked from Minki/linux
iwlwifi: missing unlock on error path
We should unlock here instead of returning -EINVAL directly. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
9011cd250e
commit
f8a22a2b16
@ -3009,14 +3009,17 @@ static int iwl_mac_offchannel_tx_cancel_wait(struct ieee80211_hw *hw)
|
|||||||
|
|
||||||
mutex_lock(&priv->mutex);
|
mutex_lock(&priv->mutex);
|
||||||
|
|
||||||
if (!priv->_agn.offchan_tx_skb)
|
if (!priv->_agn.offchan_tx_skb) {
|
||||||
return -EINVAL;
|
ret = -EINVAL;
|
||||||
|
goto unlock;
|
||||||
|
}
|
||||||
|
|
||||||
priv->_agn.offchan_tx_skb = NULL;
|
priv->_agn.offchan_tx_skb = NULL;
|
||||||
|
|
||||||
ret = iwl_scan_cancel_timeout(priv, 200);
|
ret = iwl_scan_cancel_timeout(priv, 200);
|
||||||
if (ret)
|
if (ret)
|
||||||
ret = -EIO;
|
ret = -EIO;
|
||||||
|
unlock:
|
||||||
mutex_unlock(&priv->mutex);
|
mutex_unlock(&priv->mutex);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user