Skip to content

Commit

Permalink
ASoC: soc-dapm: remove !card check from snd_soc_dapm_set_bias_level()
Browse files Browse the repository at this point in the history
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 <dan.carpenter@linaro.org>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/877c6ytd9t.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
morimoto authored and broonie committed Jan 14, 2025
1 parent 9d49925 commit 41f1d2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 41f1d2b

Please sign in to comment.