3
0
Fork 0
forked from mirrors/linux
kernel/include/linux/firmware
Richard Fitzgerald 285b2c74cf
firmware: cs_dsp: test_bin_error: Fix uninitialized data used as fw version
Call cs_dsp_mock_xm_header_get_fw_version() to get the firmware version
from the dummy XM header data in cs_dsp_bin_err_test_common_init().

Make the same change to cs_dsp_bin_test_common_init() and remove the
cs_dsp_mock_xm_header_get_fw_version_from_regmap() function.

The code in cs_dsp_test_bin.c was correctly calling
cs_dsp_mock_xm_header_get_fw_version_from_regmap() to fetch the fw version
from a dummy header it wrote to XM registers. However in
cs_dsp_test_bin_error.c the test doesn't stuff a dummy header into XM, it
populates it the normal way using a wmfw file. It should have called
cs_dsp_mock_xm_header_get_fw_version() to get the data from its blob
buffer, but was calling cs_dsp_mock_xm_header_get_fw_version_from_regmap().
As nothing had been written to the registers this returned the value of
uninitialized data.

The only other use of cs_dsp_mock_xm_header_get_fw_version_from_regmap()
was cs_dsp_test_bin.c, but it doesn't need to use it. It already has a
blob buffer containing the dummy XM header so it can use
cs_dsp_mock_xm_header_get_fw_version() to read from that.

Fixes: cd8c058499 ("firmware: cs_dsp: Add KUnit testing of bin error cases")
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20250410132129.1312541-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-10 14:47:14 +01:00
..
broadcom
cirrus firmware: cs_dsp: test_bin_error: Fix uninitialized data used as fw version 2025-04-10 14:47:14 +01:00
imx firmware: imx: remove duplicate scmi_imx_misc_ctrl_get() 2024-09-11 08:55:35 +00:00
intel
mediatek ASoC: SOF: mediatek: Constify struct mtk_adsp_ipc_ops 2024-06-17 13:08:31 +01:00
meson
qcom firmware: qcom: scm: add calls for wrapped key support 2025-01-08 17:11:07 -06:00
samsung firmware: add Exynos ACPM protocol driver 2025-02-16 11:45:51 +01:00
thead firmware: thead: Add AON firmware protocol driver 2025-03-13 14:41:32 +01:00
trusted_foundations.h
xlnx-event-manager.h soc: xilinx: Add cb event for subsystem restart 2024-06-03 13:07:56 +02:00
xlnx-zynqmp.h This is the bulk of the pin control changes for v6.13: 2024-11-25 17:24:51 -08:00