[alsa-devel] [PATCH] ASoC: simple-card-utils: fix build warning without CONFIG_OF

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Tue Dec 11 01:25:14 CET 2018


Hi

> 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: b6f3fc005a2c ("ASoC: simple-card-utils: fixup asoc_simple_card_get_dai_id() counting")
> Signed-off-by: Arnd Bergmann <arnd at arndb.de>
> ---

Acked-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>



More information about the Alsa-devel mailing list