diff mbox series

ASoC: SOF: Core: Handle error returned by sof_select_ipc_and_paths

Message ID 20240417075804.10829-1-peter.ujfalusi@linux.intel.com (mailing list archive)
State Accepted
Commit 9a039db9273b44427b3daca88173e57596545ec0
Headers show
Series ASoC: SOF: Core: Handle error returned by sof_select_ipc_and_paths | expand

Commit Message

Peter Ujfalusi April 17, 2024, 7:58 a.m. UTC
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: 90f8917e7a15 ("ASoC: SOF: Core: Add remove_late() to sof_init_environment failure path")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
Hi Mark,

Can you queue this as a fix for 6.9 cycle as 90f8917e7a15 already present
in 6.9-rc3

Thank you,
Peter

 sound/soc/sof/core.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Mark Brown April 17, 2024, 1:56 p.m. UTC | #1
On Wed, Apr 17, 2024 at 10:58:04AM +0300, Peter Ujfalusi wrote:

> Can you queue this as a fix for 6.9 cycle as 90f8917e7a15 already present
> in 6.9-rc3

When I apply fixes my scripting tends to work this out from a fixes tag,
though if something fails to apply I will tend to just bump it to -next
and let stable figure it out.
Mark Brown April 18, 2024, 12:48 a.m. UTC | #2
On Wed, 17 Apr 2024 10:58:04 +0300, Peter Ujfalusi wrote:
> 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().
> 
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: SOF: Core: Handle error returned by sof_select_ipc_and_paths
      commit: 9a039db9273b44427b3daca88173e57596545ec0

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
diff mbox series

Patch

diff --git a/sound/soc/sof/core.c b/sound/soc/sof/core.c
index cc84d4c81be9..238bda5f6b76 100644
--- a/sound/soc/sof/core.c
+++ b/sound/soc/sof/core.c
@@ -350,7 +350,9 @@  static int sof_init_environment(struct snd_sof_dev *sdev)
 	}
 
 	ret = sof_select_ipc_and_paths(sdev);
-	if (!ret && plat_data->ipc_type != base_profile->ipc_type) {
+	if (ret) {
+		goto err_machine_check;
+	} else if (plat_data->ipc_type != base_profile->ipc_type) {
 		/* IPC type changed, re-initialize the ops */
 		sof_ops_free(sdev);