]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
ASoC: SOF: core: fix error return code in sof_probe_continue()
authorWei Yongjun <weiyongjun1@huawei.com>
Sat, 9 May 2020 09:33:37 +0000 (09:33 +0000)
committerKhalid Elmously <khalid.elmously@canonical.com>
Sat, 8 Aug 2020 05:53:12 +0000 (01:53 -0400)
BugLink: https://bugs.launchpad.net/bugs/1885322
[ 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 <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20200509093337.78897-1-weiyongjun1@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
sound/soc/sof/core.c

index 12aec140819a29c4398798095e081d43d7021858..2a6b84d2781ee97aa5b0c1b6e3158a43d6d3155b 100644 (file)
@@ -372,6 +372,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;
        }