From: Kuninori Morimoto Date: Mon, 5 Sep 2022 23:17:43 +0000 (+0000) Subject: ASoC: soc-dapm.c: don't use WARN_ON() at snd_soc_dai_link_event_pre_pmu() X-Git-Tag: v6.1-rc1~158^2^2~104^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=427de091a7112aa8eaf2f689e95c0dbca5ea6543;p=thirdparty%2Fkernel%2Flinux.git 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: Kuninori Morimoto Link: https://lore.kernel.org/r/87zgfd8l7s.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 73b8bd452ca75..02924395ed867 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -3885,7 +3885,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;