]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ASoC: Intel: avs: Fix NULL pointer dereference
authorAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Thu, 24 Apr 2025 09:46:00 +0000 (11:46 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 24 Apr 2025 11:56:16 +0000 (12:56 +0100)
commit3b41574eea3922f98038fe161d30c16a13188dcc
treeb153841eb693e7d806d17c1244b1b80a6d34ee58
parent171eb6f71e9e3ba6a7410a1d93f3ac213f39dae2
ASoC: Intel: avs: Fix NULL pointer dereference

Due to unfortunate interaction between two recent patchsets, avs driver
ends up dereferencing NULL pointer when registering i2s boards.

Commit [1] does a call to avs_mach_ssp_tdm() which requires mach->pdata,
however due to another change in [2], mach->pdata is initialized after
the call. Reshuffle code to initialise mach->pdata before calling
avs_mach_ssp_tdm().

[1]

Link: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/commit/sound/soc/intel/avs?id=79138dbff53ab0e9891ebdfce8d7b298c3783cd1
[2]
Link: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/commit/sound/soc/intel/avs?id=7d859189de13f06fdc511761c745f3b302bed7b6
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250424094600.1678051-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/avs/board_selection.c