From: Wei Yongjun Date: Sat, 9 May 2020 09:33:37 +0000 (+0000) Subject: ASoC: SOF: core: fix error return code in sof_probe_continue() X-Git-Tag: v5.7.6~297 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=63aca0b1acb939f2cfa9e087a15f8ffa49236207;p=users%2Fdwmw2%2Flinux.git ASoC: SOF: core: fix error return code in sof_probe_continue() [ Upstream commit 7d8785bc7adbb4dc5ba8ee06994107637848ded8 ] Fix to return negative error code -ENOMEM from the IPC init error handling case instead of 0, as done elsewhere in this function. Fixes: c16211d6226d ("ASoC: SOF: Add Sound Open Firmware driver core") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20200509093337.78897-1-weiyongjun1@huawei.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- diff --git a/sound/soc/sof/core.c b/sound/soc/sof/core.c index 91acfae7935c9..74b4382162167 100644 --- a/sound/soc/sof/core.c +++ b/sound/soc/sof/core.c @@ -176,6 +176,7 @@ static int sof_probe_continue(struct snd_sof_dev *sdev) /* init the IPC */ sdev->ipc = snd_sof_ipc_init(sdev); if (!sdev->ipc) { + ret = -ENOMEM; dev_err(sdev->dev, "error: failed to init DSP IPC %d\n", ret); goto ipc_err; }