提交 f8a22a2b 编写于 作者: D Dan Carpenter 提交者: John W. Linville

iwlwifi: missing unlock on error path

We should unlock here instead of returning -EINVAL directly.
Signed-off-by: NDan Carpenter <error27@gmail.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 9011cd25
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册