Commit 4c3140f4 authored by Dan Carpenter's avatar Dan Carpenter Committed by Kalle Valo

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: deebea35 ("wifi: rtw89: early recognize FW feature to decide if chanctx")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/YyMzDtX/3fUBnonC@kili
parent f2c6e7ca
......@@ -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 ?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment