ASoC: simple-card-utils: Allocate link info structure on heap
authorThierry Reding <treding@nvidia.com>
Mon, 19 Apr 2021 16:41:17 +0000 (18:41 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 20 Apr 2021 12:47:30 +0000 (13:47 +0100)
commitec1af6c64db94e4f24e53011a77b2bf2220ae000
treebd2ec434df0717514d8fc8c03e07fa478067bb86
parent7f51384f17b3e1039fbb2d3535cc777585dc3175
ASoC: simple-card-utils: Allocate link info structure on heap

struct link_info can grow fairly large and may cause the stack frame
size to be exceeded when allocated on the stack. Some architectures
such as 32-bit ARM, RISC-V or PowerPC have small stack frames where
this causes a compiler warning, so allocate these structures on the
heap instead of the stack.

Fixes: 343e55e71877 ("ASoC: simple-card-utils: Increase maximum number of links to 128")
Reported-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/20210419164117.1422242-1-thierry.reding@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/generic/audio-graph-card.c
sound/soc/generic/simple-card.c