Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: soc-card: remove card check

only snd_soc_card_set_bias_level() and snd_soc_card_set_bias_level_post()
are checking "card" in the function, like below

int snd_soc_card_set_bias_level(...)
{
...
=> if (card && card->xxx)
ret = card->xxxx(...);
...
}

But it should already have been an error if "card" was NULL.
remove "card" NULL check here. Otherwise it will get waring on
smatch without this patch. This is prepare for error check cleanup.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87msg2knsg.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Kuninori Morimoto and committed by
Mark Brown
9c3d68ce 309caeef

+2 -2
+2 -2
sound/soc/soc-card.c
··· 219 219 { 220 220 int ret = 0; 221 221 222 - if (card && card->set_bias_level) 222 + if (card->set_bias_level) 223 223 ret = card->set_bias_level(card, dapm, level); 224 224 225 225 return soc_card_ret(card, ret); ··· 231 231 { 232 232 int ret = 0; 233 233 234 - if (card && card->set_bias_level_post) 234 + if (card->set_bias_level_post) 235 235 ret = card->set_bias_level_post(card, dapm, level); 236 236 237 237 return soc_card_ret(card, ret);