]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: rtw89: unlock on error path in rtw89_ops_unassign_vif_chanctx()
authorDan Carpenter <dan.carpenter@linaro.org>
Mon, 21 Oct 2024 09:14:39 +0000 (12:14 +0300)
committerPing-Ke Shih <pkshih@realtek.com>
Fri, 25 Oct 2024 02:26:46 +0000 (10:26 +0800)
We need to call mutex_unlock() on this error path.

Fixes: aad0394e7a02 ("wifi: rtw89: tweak driver architecture for impending MLO support")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/8683a712-ffc2-466b-8382-0b264719f8ef@stanley.mountain
drivers/net/wireless/realtek/rtw89/mac80211.c

index 1ee63a85308ff0244f0ae92da794eeb44c91dd4e..565347a6e1e6f7b8f70defd560611b8b300ff3fc 100644 (file)
@@ -1373,6 +1373,7 @@ static void rtw89_ops_unassign_vif_chanctx(struct ieee80211_hw *hw,
 
        rtwvif_link = rtwvif->links[link_conf->link_id];
        if (unlikely(!rtwvif_link)) {
+               mutex_unlock(&rtwdev->mutex);
                rtw89_err(rtwdev,
                          "%s: rtwvif link (link_id %u) is not active\n",
                          __func__, link_conf->link_id);