]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: simple_card_utils: fix fallback when "label" property isn't present
authorLucas Stach <l.stach@pengutronix.de>
Tue, 29 Aug 2017 15:51:22 +0000 (17:51 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 30 Aug 2017 17:41:38 +0000 (18:41 +0100)
commit0c32dd51c07adfd84a3bbc8b3ae2ac0569eeb559
treea193fec5d8492dd579a942f11fa7a4261c51625c
parent9238ecfbaaeffcf7977c2776af9c57c0a4a878ed
ASoC: simple_card_utils: fix fallback when "label" property isn't present

snd_soc_of_parse_card_name() doesn't return an error if the requested
property isn't present, but silently fails to fill the card name. This can
not be changed, as it is a backwards compatibility measure itself.

We can not rely on the return value of this function alone, but must check
if the card name has been filled sucessfully when deciding to skip the
fallback path, which is in place for existing users.

Fixes: f39770cc19e2 (ASoC: simple-card-utils: enable "label" on
                     asoc_simple_card_parse_card_name)
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/generic/simple-card-utils.c