]> git.proxmox.com Git - mirror_ubuntu-hirsute-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)
committerMark Brown <broonie@kernel.org>
Mon, 11 May 2020 11:24:59 +0000 (12:24 +0100)
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>
sound/soc/sof/core.c

index 94a2cb58ab9a1326342224b227d6cfb05e78ed65..ef9be4f45e27cc28cc353c717bb6d5c8ac418a1d 100644 (file)
@@ -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;
        }