diff options
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, | |||
| 502 | { | 502 | { |
| 503 | struct snd_soc_dai_driver *dai_drv = | 503 | struct snd_soc_dai_driver *dai_drv = |
| 504 | container_of(dobj, struct snd_soc_dai_driver, dobj); | 504 | container_of(dobj, struct snd_soc_dai_driver, dobj); |
| 505 | struct snd_soc_dai *dai; | ||
| 505 | 506 | ||
| 506 | if (pass != SOC_TPLG_PASS_PCM_DAI) | 507 | if (pass != SOC_TPLG_PASS_PCM_DAI) |
| 507 | return; | 508 | return; |
| @@ -509,6 +510,10 @@ static void remove_dai(struct snd_soc_component *comp, | |||
| 509 | if (dobj->ops && dobj->ops->dai_unload) | 510 | if (dobj->ops && dobj->ops->dai_unload) |
| 510 | dobj->ops->dai_unload(comp, dobj); | 511 | dobj->ops->dai_unload(comp, dobj); |
| 511 | 512 | ||
| 513 | list_for_each_entry(dai, &comp->dai_list, list) | ||
| 514 | if (dai->driver == dai_drv) | ||
| 515 | dai->driver = NULL; | ||
| 516 | |||
| 512 | kfree(dai_drv->name); | 517 | kfree(dai_drv->name); |
| 513 | list_del(&dobj->list); | 518 | list_del(&dobj->list); |
| 514 | kfree(dai_drv); | 519 | kfree(dai_drv); |
