Skip to content

Commit 9a039db

Browse files
ujfalusibroonie
authored andcommitted
ASoC: SOF: Core: Handle error returned by sof_select_ipc_and_paths
The patch which fixed the missing remove_late() calls missed a case when sof_select_ipc_and_paths() could return with error and in this case sof_init_environment() would just return with 0. Do not ignore the error code returned by sof_select_ipc_and_paths(). Fixes: 90f8917 ("ASoC: SOF: Core: Add remove_late() to sof_init_environment failure path") Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent cebfbc8 commit 9a039db

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sound/soc/sof/core.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,9 @@ static int sof_init_environment(struct snd_sof_dev *sdev)
350350
}
351351

352352
ret = sof_select_ipc_and_paths(sdev);
353-
if (!ret && plat_data->ipc_type != base_profile->ipc_type) {
353+
if (ret) {
354+
goto err_machine_check;
355+
} else if (plat_data->ipc_type != base_profile->ipc_type) {
354356
/* IPC type changed, re-initialize the ops */
355357
sof_ops_free(sdev);
356358

0 commit comments

Comments
 (0)