diff options
| author | Charles Keepax <ckeepax@opensource.cirrus.com> | 2026-03-18 13:38:13 +0300 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-03-18 14:21:15 +0300 |
| commit | 6017671da9d0a11056bf37b4b54903e57dbc9cd1 (patch) | |
| tree | 4bddb94f47a918309cf3746480287f127f38ba36 | |
| parent | 4ebaf9d999327ce8e2ea5847ac96fe53fde3fe9a (diff) | |
| download | linux-6017671da9d0a11056bf37b4b54903e57dbc9cd1.tar.xz | |
ASoC: wm_adsp: Fix crash in kunit tests on arm64
Several of the wm_adsp kunit tests failed by only on arm64. This
turns out to be passing things to release_firmware which were not
allocated with request_firmware. This does actually drop some
errors on other platforms but somehow doesn't cause the tests to
fail, and kunit hides a lot of the output for passing tests.
There is a comment in the code regarding this exact thing in
wm_adsp_fw_find_test_case_exit(), but then it goes on and
does it anyway. I suspect maybe there was a plan to override
wm_adsp_release_firmware_files() that got forgotten, as the
function appears to have hooks for kunit that aren't used. Anyway
for now implement a simple fix of freeing the filenames
locally. It is likely a more detailed fix will be implemented in
the near future but this should get things moving again.
Fixes: bf2d44d07de7 ("ASoC: wm_adsp: Add kunit test for firmware file search")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260318103813.249190-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
| -rw-r--r-- | sound/soc/codecs/wm_adsp_fw_find_test.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm_adsp_fw_find_test.c b/sound/soc/codecs/wm_adsp_fw_find_test.c index 44c26e991b35..fb886dc61c27 100644 --- a/sound/soc/codecs/wm_adsp_fw_find_test.c +++ b/sound/soc/codecs/wm_adsp_fw_find_test.c @@ -262,7 +262,8 @@ static void wm_adsp_fw_find_test_case_exit(struct kunit *test) * dummies not allocated by the real request_firmware() call they * must not be passed to release_firmware(). */ - wm_adsp_release_firmware_files(&priv->found_fw); + kfree(priv->found_fw.wmfw.filename); + kfree(priv->found_fw.coeff.filename); } static void wm_adsp_fw_find_test_param_desc(const struct wm_adsp_fw_find_test_params *param, |
