From: Alessandro Zanni <alessandro.zanni87@gmail.com>
To: pkshih@realtek.com, kvalo@kernel.org
Cc: Alessandro Zanni <alessandro.zanni87@gmail.com>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
skhan@linuxfoundation.org, anupnewsmail@gmail.com
Subject: [PATCH] wifi: rtw89: wow: Add unlock mutex before to return
Date: Tue, 1 Oct 2024 11:13:16 +0200 [thread overview]
Message-ID: <20241001091320.38687-1-alessandro.zanni87@gmail.com> (raw)
In error handling code for "ieee80211_gtk_rekey_add failed", release
the mutex before to return.
Found with Coccinelle static analisys tool,
script: https://coccinelle.gitlabpages.inria.fr/website/rules/mut.cocci
Signed-off-by: Alessandro Zanni <alessandro.zanni87@gmail.com>
---
drivers/net/wireless/realtek/rtw89/wow.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/realtek/rtw89/wow.c b/drivers/net/wireless/realtek/rtw89/wow.c
index 86e24e07780d..8045acb27cf9 100644
--- a/drivers/net/wireless/realtek/rtw89/wow.c
+++ b/drivers/net/wireless/realtek/rtw89/wow.c
@@ -624,6 +624,7 @@ static struct ieee80211_key_conf *rtw89_wow_gtk_rekey(struct rtw89_dev *rtwdev,
kfree(rekey_conf);
if (IS_ERR(key)) {
rtw89_err(rtwdev, "ieee80211_gtk_rekey_add failed\n");
+ mutex_unlock(&rtwdev->mutex);
return NULL;
}
--
2.43.0
next reply other threads:[~2024-10-01 9:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-01 9:13 Alessandro Zanni [this message]
2024-10-04 4:13 ` Ping-Ke Shih
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241001091320.38687-1-alessandro.zanni87@gmail.com \
--to=alessandro.zanni87@gmail.com \
--cc=anupnewsmail@gmail.com \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=pkshih@realtek.com \
--cc=skhan@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®