提交 d49813c4 编写于 作者: Z Zhen Lei 提交者: Yang Yingliang

ASoC: soc-core: Fix the error return code in snd_soc_of_parse_audio_routing()

stable inclusion
from linux-4.19.198
commit b638d66d2980346713f5bc5d4637481520143bc0

--------------------------------

[ Upstream commit 7d3865a1 ]

When devm_kcalloc() fails, the error code -ENOMEM should be returned
instead of -EINVAL.
Signed-off-by: NZhen Lei <thunder.leizhen@huawei.com>
Link: https://lore.kernel.org/r/20210617103729.1918-1-thunder.leizhen@huawei.comSigned-off-by: NMark Brown <broonie@kernel.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 57c63dfd
......@@ -3510,7 +3510,7 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
if (!routes) {
dev_err(card->dev,
"ASoC: Could not allocate DAPM route table\n");
return -EINVAL;
return -ENOMEM;
}
for (i = 0; i < num_routes; i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册