Commit 7aea88b
committed
ASoC: SOF: sof-audio: Fix error path in sof_widget_setup_unlocked()
If either tplg_ops->dai_config or widget_kcontrol_setup fail during widget
setup we would double decrement the use_count of the widget because the
sof_widget_free_unlocked() would be called twice, similarly the core_put
would be invoked twice as well.
The code between pipe_widget_free and use_count_dec is done within
sof_widget_free_unlocked() and we need to skip it during error handling.
The fixes tag is picked to the last change around this part of the code
which is adequately old enough for backporting purposes.
Link: thesofproject/sof#10826
Fixes: 31ed8da ("ASoC: SOF: sof-audio: Modify logic for enabling/disabling topology cores")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>1 parent 3a0f2ae commit 7aea88b
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| 231 | + | |
| 232 | + | |
231 | 233 | | |
232 | 234 | | |
233 | 235 | | |
| |||
0 commit comments