Skip to contentSkip to conversation

ASoC: SOF: core: Only call sof_ops_free() on remove if the probe was successful

PATCH In review Peter Ujfalusi 2 participants 2 messages Sep 15, 2023 – Sep 16, 2023

Subsystems (3)
lore
Share & tools
lore

Peter Ujfalusi

author maintainer
#0 lore raw

PATCH 1/1 ASoC: SOF: core: Only call sof_ops_free() on remove if the probe was successful

All the fail paths during probe will free up the ops, on remove we should only free it if the probe was successful.

---
 sound/soc/sof/core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/sof/core.c +1 -2
index 30db685cc5f4..2d1616b81485 100644
@@ -486,10 +486,9 @@ int snd_sof_device_remove(struct device *dev)
 		snd_sof_ipc_free(sdev);
 		snd_sof_free_debug(sdev);
 		snd_sof_remove(sdev);
+		sof_ops_free(sdev);
 	}
 
-	sof_ops_free(sdev);
-
 	/* release firmware */
 	snd_sof_fw_unload(sdev);
 
Signature · 1 line
2.42.0
maintainer
#1 lore raw
Quoted 4 lines · Peter Ujfalusi

All the fail paths during probe will free up the ops, on remove we should only free it if the probe was successful.

Applied to

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

Thanks!

[1/1] ASoC: SOF: core: Only call sof_ops_free() on remove if the probe was successful

      commit: 31bb7bd9ffee50d09ec931998b823a86132ab807

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