Message ID | 20220606134926.3725806-1-amadeuszx.slawinski@linux.intel.com |
---|---|
State | Accepted |
Commit | 2fe08216fda33bbc1f80133b8fd560ffd094b987 |
Headers | show |
Series | [v2] ASoC: SOF: Fix potential NULL pointer dereference | expand |
diff --git a/sound/soc/sof/sof-audio.c b/sound/soc/sof/sof-audio.c index 8d740635a4bb..28976098a89e 100644 --- a/sound/soc/sof/sof-audio.c +++ b/sound/soc/sof/sof-audio.c @@ -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; }