Commit 427de091 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: soc-dapm.c: don't use WARN_ON() at snd_soc_dai_link_event_pre_pmu()

Current snd_soc_dai_link_event_pre_pmu() is checking "config".
It is using dev_err() (A) if it was NULL, so we don't need to use
WARN_ON() (B) to check it, it is over-kill. This patch removes it.

(B)	if (WARN_ON(!config)) {
(A)		dev_err(...);
		...
	}
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87zgfd8l7s.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent d2a411f8
...@@ -3885,7 +3885,7 @@ snd_soc_dai_link_event_pre_pmu(struct snd_soc_dapm_widget *w, ...@@ -3885,7 +3885,7 @@ snd_soc_dai_link_event_pre_pmu(struct snd_soc_dapm_widget *w,
* necessary * necessary
*/ */
config = rtd->dai_link->params + rtd->params_select; config = rtd->dai_link->params + rtd->params_select;
if (WARN_ON(!config)) { if (!config) {
dev_err(w->dapm->dev, "ASoC: link config missing\n"); dev_err(w->dapm->dev, "ASoC: link config missing\n");
ret = -EINVAL; ret = -EINVAL;
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment