提交 5fce6747 编写于 作者: Y Yang Yingliang

ALSA: ppc: fix error return code in snd_pmac_probe()

stable inclusion
from linux-4.19.198
commit 477448b31d10e6080be66b34f19efb24affad228

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

[ Upstream commit 80b9c1be ]

If snd_pmac_tumbler_init() or snd_pmac_tumbler_post_init() fails,
snd_pmac_probe() need return error code.
Reported-by: NHulk Robot <hulkci@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210616021121.1991502-1-yangyingliang@huawei.comSigned-off-by: NTakashi Iwai <tiwai@suse.de>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 b9520577
...@@ -90,7 +90,11 @@ static int snd_pmac_probe(struct platform_device *devptr) ...@@ -90,7 +90,11 @@ static int snd_pmac_probe(struct platform_device *devptr)
sprintf(card->shortname, "PowerMac %s", name_ext); sprintf(card->shortname, "PowerMac %s", name_ext);
sprintf(card->longname, "%s (Dev %d) Sub-frame %d", sprintf(card->longname, "%s (Dev %d) Sub-frame %d",
card->shortname, chip->device_id, chip->subframe); card->shortname, chip->device_id, chip->subframe);
if ( snd_pmac_tumbler_init(chip) < 0 || snd_pmac_tumbler_post_init() < 0) err = snd_pmac_tumbler_init(chip);
if (err < 0)
goto __error;
err = snd_pmac_tumbler_post_init();
if (err < 0)
goto __error; goto __error;
break; break;
case PMAC_AWACS: case PMAC_AWACS:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册