FROMGIT: ASoC: Intel: sof_sdw: Avoid NULL check fail when re-probing
The static platform_component name string is overwritten on card tear down by sof_link_unload(). After this has happened the NULL check on it in asoc_sdw_init_simple_dai_link() will fail when the driver is reprobed, causing the machine driver to fail probe. However, it also turns out that the ASoC core sets this string for all topology systems in soc_check_tplg_fes() anyway, after the aforementioned NULL check. So there is no need for the machine driver to set the platform name to anything meaningful at all. Replace all the platform_component stuff with some simple place holders and importantly since the core tampers with the snd_soc_dai_link_component in multiple places allocate a new one for each usage. (cherry picked from commit 742fcada8bf8aea5ba1e699fb5ae95b99c4dcfa1 https://github.com/CirrusLogic/linux-drivers v6.12-cs42l43-cs35l56) Fixes: 59f8b622 ("ASoC: intel/sdw_utils: refactor init_dai_link() and init_simple_dai_link()") Signed-off-by:Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250505141409.2614010-3-ckeepax@opensource.cirrus.com Signed-off-by:
Mark Brown <broonie@kernel.org> Change-Id: I8fed564374fd51668b4ecd10e632e3255595a126 Signed-off-by:
Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by:
Tongtong Pan <pantongtong@huaqin.corp-partner.google.com>
Loading
Please sign in to comment