mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 22:02:02 +00:00
ASoC: SOF: Fix potential NULL pointer dereference
Cleanup path for sof_prepare_widgets_in_path() should check if unprepare callback exists before calling it, instead it checks if it does not exist. Fix the check. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20220602135757.3335351-1-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
07551992cd
commit
2fe08216fd
1 changed files with 1 additions and 1 deletions
|
@ -318,7 +318,7 @@ sof_prepare_widgets_in_path(struct snd_sof_dev *sdev, struct snd_soc_dapm_widget
|
|||
p->walking = false;
|
||||
if (ret < 0) {
|
||||
/* unprepare the source widget */
|
||||
if (!widget_ops[widget->id].ipc_unprepare && swidget->prepared) {
|
||||
if (widget_ops[widget->id].ipc_unprepare && swidget->prepared) {
|
||||
widget_ops[widget->id].ipc_unprepare(swidget);
|
||||
swidget->prepared = false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue