From: Kuninori Morimoto Date: Tue, 14 Jan 2025 01:06:22 +0000 (+0000) Subject: ASoC: soc-dapm: remove !card check from snd_soc_dapm_set_bias_level() X-Git-Tag: v6.14-rc1~24^2~13^2~5 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=41f1d2bd4998829341cdada022ede610068a0f33;p=linux-block.git ASoC: soc-dapm: remove !card check from snd_soc_dapm_set_bias_level() dapm is setup by snd_soc_dapm_init(), thus dapm->card never been NULL. We don't need if (!card) check for it. Reported-by: Dan Carpenter Signed-off-by: Kuninori Morimoto Link: https://patch.msgid.link/877c6ytd9t.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 99521c784a9b..c0d2c8afe92c 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -730,7 +730,7 @@ static int snd_soc_dapm_set_bias_level(struct snd_soc_dapm_context *dapm, if (ret != 0) goto out; - if (!card || dapm != &card->dapm) + if (dapm != &card->dapm) ret = snd_soc_dapm_force_bias_level(dapm, level); if (ret != 0)