From: Dan Carpenter <dan.carpenter@oracle.com>
To: Ping-Ke Shih <pkshih@realtek.com>,
Zong-Zhe Yang <kevin_yang@realtek.com>
Cc: Kalle Valo <kvalo@kernel.org>,
Zong-Zhe Yang <kevin_yang@realtek.com>,
linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH] wifi: rtw89: uninitialized variable on error in rtw89_early_fw_feature_recognize()
Date: Thu, 15 Sep 2022 17:13:34 +0300 [thread overview]
Message-ID: <YyMzDtX/3fUBnonC@kili> (raw)
If request_partial_firmware_into_buf() fails then "firmware" is not
initialized and the release_firmware(firmware) will crash.
Fixes: deebea35d699 ("wifi: rtw89: early recognize FW feature to decide if chanctx")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/net/wireless/realtek/rtw89/fw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c
index 8e4d0e18fa71..2be70b907762 100644
--- a/drivers/net/wireless/realtek/rtw89/fw.c
+++ b/drivers/net/wireless/realtek/rtw89/fw.c
@@ -268,7 +268,7 @@ void rtw89_early_fw_feature_recognize(struct device *device,
device, &buf, sizeof(buf), 0);
if (ret) {
dev_err(device, "failed to early request firmware: %d\n", ret);
- goto out;
+ return;
}
ver_code = buf.mfw_hdr.sig != RTW89_MFW_SIG ?
--
2.35.1
next reply other threads:[~2022-09-15 14:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-15 14:13 Dan Carpenter [this message]
2022-09-16 0:24 ` [PATCH] wifi: rtw89: uninitialized variable on error in rtw89_early_fw_feature_recognize() Ping-Ke Shih
2022-09-19 10:09 ` Kalle Valo
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=YyMzDtX/3fUBnonC@kili \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kevin_yang@realtek.com \
--cc=kvalo@kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=pkshih@realtek.com \
/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;
as well as URLs for NNTP newsgroup(s).