diff mbox series

[2/4] ASoC: soc-dapm.c: don't use WARN_ON() at snd_soc_dai_link_event_pre_pmu()

Message ID 87zgfd8l7s.wl-kuninori.morimoto.gx@renesas.com
State Accepted
Commit 427de091a7112aa8eaf2f689e95c0dbca5ea6543
Headers show
Series ASoC: soc-dapm.c: random cleanup | expand

Commit Message

Kuninori Morimoto Sept. 5, 2022, 11:17 p.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@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@renesas.com>
---
 sound/soc/soc-dapm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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;