mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 23:22:31 +02:00
ASoC: Intel: avs: Fix NULL ptr deref on rmmod
When uloading snd_soc_avs module there is NULL pointer dereference.
It happens, because codec was moved into pdata and
avs_component_hda_unregister_dais() was not updated.
Fixes: 1581d5c682 ("ASoC: Intel: avs: boards: Add Kconfig option for obsolete card names")
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://patch.msgid.link/20250708105009.1883627-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
6f80be5485
commit
a609bd74b8
|
|
@ -1570,11 +1570,13 @@ static void avs_component_hda_unregister_dais(struct snd_soc_component *componen
|
|||
{
|
||||
struct snd_soc_acpi_mach *mach;
|
||||
struct snd_soc_dai *dai, *save;
|
||||
struct avs_mach_pdata *pdata;
|
||||
struct hda_codec *codec;
|
||||
char name[32];
|
||||
|
||||
mach = dev_get_platdata(component->card->dev);
|
||||
codec = mach->pdata;
|
||||
pdata = mach->pdata;
|
||||
codec = pdata->codec;
|
||||
snprintf(name, sizeof(name), "%s-cpu", dev_name(&codec->core.dev));
|
||||
|
||||
for_each_component_dais_safe(component, dai, save) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user