mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
ASoC: dapm: Fix potential DAI widget pointer deref when linking DAIs
[ Upstream commit e01b4f6242 ]
Sometime a component or topology may configure a DAI widget with no
private data leading to a dev_dbg() dereferencne of this data.
Fix this to check for non NULL private data and let users know if widget
is missing DAI.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
64e5837e85
commit
dfbf508f31
@@ -3913,6 +3913,13 @@ int snd_soc_dapm_link_dai_widgets(struct snd_soc_card *card)
|
||||
continue;
|
||||
}
|
||||
|
||||
/* let users know there is no DAI to link */
|
||||
if (!dai_w->priv) {
|
||||
dev_dbg(card->dev, "dai widget %s has no DAI\n",
|
||||
dai_w->name);
|
||||
continue;
|
||||
}
|
||||
|
||||
dai = dai_w->priv;
|
||||
|
||||
/* ...find all widgets with the same stream and link them */
|
||||
|
||||
Reference in New Issue
Block a user