summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2019-05-17 15:06:37 +0900
committerMark Brown <broonie@kernel.org>2019-05-20 15:21:42 +0100
commit2ffb0f580bded5f16ec4d619f8abb4745425e864 (patch)
tree156bc7f1795b850c8f3d8e7d9344b4907bd6f63f /sound/soc/soc-core.c
parente9b5daad4e9bdd1b9e467873a4463c867ccf9ff1 (diff)
downloadlinux-2ffb0f580bded5f16ec4d619f8abb4745425e864.tar.bz2
ASoC: soc-core: WARN() is not related to component->driver->probe
soc_probe_component() has WARN() under if (component->driver->probe), but, this WARN() check is not related to .probe callback. So, it should be called at (B) instead of (A). This patch moves it out of if(). if (component->driver->probe) { ret = component->driver->probe(component); ... (A) WARN(...) } (B) WARN(...) Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index e83edbe27041..ce8c057bcd5b 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1420,12 +1420,11 @@ static int soc_probe_component(struct snd_soc_card *card,
"ASoC: failed to probe component %d\n", ret);
goto err_probe;
}
-
- WARN(dapm->idle_bias_off &&
- dapm->bias_level != SND_SOC_BIAS_OFF,
- "codec %s can not start from non-off bias with idle_bias_off==1\n",
- component->name);
}
+ WARN(dapm->idle_bias_off &&
+ dapm->bias_level != SND_SOC_BIAS_OFF,
+ "codec %s can not start from non-off bias with idle_bias_off==1\n",
+ component->name);
/* machine specific init */
if (component->init) {