All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: SOF: Core: Handle error returned by sof_select_ipc_and_paths
@ 2024-04-17  7:58 Peter Ujfalusi
  2024-04-17 13:56 ` Mark Brown
  2024-04-18  0:48 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Ujfalusi @ 2024-04-17  7:58 UTC (permalink / raw)
  To: lgirdwood, broonie
  Cc: linux-sound, pierre-louis.bossart, kai.vehmanen,
	ranjani.sridharan, chaitanya.kumar.borah, yung-chuan.liao,
	rodrigo.vivi

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(-)

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);
 
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: SOF: Core: Handle error returned by sof_select_ipc_and_paths
  2024-04-17  7:58 [PATCH] ASoC: SOF: Core: Handle error returned by sof_select_ipc_and_paths Peter Ujfalusi
@ 2024-04-17 13:56 ` Mark Brown
  2024-04-18  0:48 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2024-04-17 13:56 UTC (permalink / raw)
  To: Peter Ujfalusi
  Cc: lgirdwood, linux-sound, pierre-louis.bossart, kai.vehmanen,
	ranjani.sridharan, chaitanya.kumar.borah, yung-chuan.liao,
	rodrigo.vivi

[-- Attachment #1: Type: text/plain, Size: 330 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: SOF: Core: Handle error returned by sof_select_ipc_and_paths
  2024-04-17  7:58 [PATCH] ASoC: SOF: Core: Handle error returned by sof_select_ipc_and_paths Peter Ujfalusi
  2024-04-17 13:56 ` Mark Brown
@ 2024-04-18  0:48 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2024-04-18  0:48 UTC (permalink / raw)
  To: lgirdwood, Peter Ujfalusi
  Cc: linux-sound, pierre-louis.bossart, kai.vehmanen,
	ranjani.sridharan, chaitanya.kumar.borah, yung-chuan.liao,
	rodrigo.vivi

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-18  0:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-17  7:58 [PATCH] ASoC: SOF: Core: Handle error returned by sof_select_ipc_and_paths Peter Ujfalusi
2024-04-17 13:56 ` Mark Brown
2024-04-18  0:48 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.