Skip to content

Commit 7d8785b

Browse files
Wei Yongjunbroonie
authored andcommitted
ASoC: SOF: core: fix error return code in sof_probe_continue()
Fix to return negative error code -ENOMEM from the IPC init error handling case instead of 0, as done elsewhere in this function. Fixes: c16211d ("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>
1 parent d9a2d10 commit 7d8785b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎sound/soc/sof/core.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ static int sof_probe_continue(struct snd_sof_dev *sdev)
176176
/* init the IPC */
177177
sdev->ipc = snd_sof_ipc_init(sdev);
178178
if (!sdev->ipc) {
179+
ret = -ENOMEM;
179180
dev_err(sdev->dev, "error: failed to init DSP IPC %d\n", ret);
180181
goto ipc_err;
181182
}

0 commit comments

Comments
 (0)