ASoC: acp: check the return value of devm_kzalloc() in acp_legacy_dai_links_create()
authorJia-Ju Bai <baijiaju1990@gmail.com>
Fri, 25 Feb 2022 13:16:45 +0000 (05:16 -0800)
committerMark Brown <broonie@kernel.org>
Fri, 25 Feb 2022 13:45:41 +0000 (13:45 +0000)
commit431f9a77a4a62694ce90742d1f4c5abe1b8b6612
treee8fd40bf75c2929eb1ac2889a3359e4a58ab1d08
parent4d06f92f38b799295ae22c98be7a20cac3e2a1a7
ASoC: acp: check the return value of devm_kzalloc() in acp_legacy_dai_links_create()

The function devm_kzalloc() in acp_legacy_dai_links_create() can fail,
so its return value should be checked.

Fixes: d4c750f2c7d4 ("ASoC: amd: acp: Add generic machine driver support for ACP cards")
Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Link: https://lore.kernel.org/r/20220225131645.27556-1-baijiaju1990@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/amd/acp/acp-mach-common.c