diff options
author | Takashi Iwai <tiwai@suse.de> | 2019-02-08 14:07:18 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-02-08 14:07:18 +0100 |
commit | 0a5cf9e88b5178d15f00f3cf35081841d80403cd (patch) | |
tree | a0839097f88b9dc215fa783d67b9a9b78d9aede6 /sound/soc/soc-topology.c | |
parent | 2bc16b9f3223d049b57202ee702fcb5b9b507019 (diff) | |
parent | 860b454c2c0cbda6892954f5cdbbb48931b3c8db (diff) |
Merge tag 'asoc-fix-v5.0-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v5.0
A selection of driver specific fixes here, along with a few core fixes:
- A fixup for some MFD devices that were broken by the previous fixes
for deferred probe.
- A fix for potential out of bounds array accesses when ordering DAPM
power/up down sequences.
- Avoid use after free issue when unloading and reloading drivers using
topologies.
Diffstat (limited to 'sound/soc/soc-topology.c')
-rw-r--r-- | sound/soc/soc-topology.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index 045ef136903d..fc79ec6927e3 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -502,6 +502,7 @@ static void remove_dai(struct snd_soc_component *comp, { struct snd_soc_dai_driver *dai_drv = container_of(dobj, struct snd_soc_dai_driver, dobj); + struct snd_soc_dai *dai; if (pass != SOC_TPLG_PASS_PCM_DAI) return; @@ -509,6 +510,10 @@ static void remove_dai(struct snd_soc_component *comp, if (dobj->ops && dobj->ops->dai_unload) dobj->ops->dai_unload(comp, dobj); + list_for_each_entry(dai, &comp->dai_list, list) + if (dai->driver == dai_drv) + dai->driver = NULL; + kfree(dai_drv->name); list_del(&dobj->list); kfree(dai_drv); |