mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-07 19:49:33 -04:00
wifi: rtw89: uninitialized variable on error in rtw89_early_fw_feature_recognize()
If request_partial_firmware_into_buf() fails then "firmware" is not
initialized and the release_firmware(firmware) will crash.
Fixes: deebea35d6 ("wifi: rtw89: early recognize FW feature to decide if chanctx")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/YyMzDtX/3fUBnonC@kili
This commit is contained in:
committed by
Kalle Valo
parent
f2c6e7ca3e
commit
4c3140f4ce
@@ -271,7 +271,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 ?
|
||||
|
||||
Reference in New Issue
Block a user