[PATCH 2/4] ASoC: soc-dapm.c: don't use WARN_ON() at snd_soc_dai_link_event_pre_pmu()
Kuninori Morimoto
kuninori.morimoto.gx at renesas.com
Tue Sep 6 01:17:43 CEST 2022
From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
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: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
---
sound/soc/soc-dapm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 7d4e4068f870..bc7d64b570b4 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3883,7 +3883,7 @@ snd_soc_dai_link_event_pre_pmu(struct snd_soc_dapm_widget *w,
* necessary
*/
config = rtd->dai_link->params + rtd->params_select;
- if (WARN_ON(!config)) {
+ if (!config) {
dev_err(w->dapm->dev, "ASoC: link config missing\n");
ret = -EINVAL;
goto out;
--
2.25.1
More information about the Alsa-devel
mailing list