]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: simple-card-utils: fix build warning without CONFIG_OF
authorArnd Bergmann <arnd@arndb.de>
Mon, 10 Dec 2018 20:46:10 +0000 (21:46 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 11 Dec 2018 01:08:51 +0000 (01:08 +0000)
commitadf095d8882bc674c6599516a83ebebda5e04c54
treed2940be30ae2bed52fdaeb1f60f2f00307830dd8
parentb946a963b7755affa5180e52257284f000c53872
ASoC: simple-card-utils: fix build warning without CONFIG_OF

When CONFIG_OF is disabled, of_graph_parse_endpoint() does not
initialize 'info', and gcc can see that:

sound/soc/generic/simple-card-utils.c: In function 'asoc_simple_card_parse_graph_dai':
sound/soc/generic/simple-card-utils.c:284:13: error: 'info.port' may be used uninitialized in this function [-Werror=maybe-uninitialized]

It's probably best to check the return code anyway, and that also
takes care of the warning.

Fixes: 41b268dc3492 ("ASoC: simple-card-utils: fixup asoc_simple_card_get_dai_id() counting")
Signed-off-by: Arnd Bergmann <arnd@arndb.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