Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Intel: avs: Fix pci_probe() error path
@ 2024-02-02 11:49 Cezary Rojewski
  2024-02-05 16:58 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Cezary Rojewski @ 2024-02-02 11:49 UTC (permalink / raw)
  To: broonie
  Cc: alsa-devel, linux-sound, tiwai, perex, amadeuszx.slawinski,
	pierre-louis.bossart, hdegoede, Cezary Rojewski

Recent changes modified operation-order in the probe() function without
updating its error path accordingly. If snd_hdac_i915_init() exists with
status EPROBE_DEFER the error path must cleanup allocated IRQs before
leaving the scope.

Fixes: 2dddc514b6e4 ("ASoC: Intel: avs: Move snd_hdac_i915_init to before probe_work.")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
---
 sound/soc/intel/avs/core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sound/soc/intel/avs/core.c b/sound/soc/intel/avs/core.c
index 59c3793f65df..db78eb2f0108 100644
--- a/sound/soc/intel/avs/core.c
+++ b/sound/soc/intel/avs/core.c
@@ -477,6 +477,9 @@ static int avs_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)
 	return 0;
 
 err_i915_init:
+	pci_free_irq(pci, 0, adev);
+	pci_free_irq(pci, 0, bus);
+	pci_free_irq_vectors(pci);
 	pci_clear_master(pci);
 	pci_set_drvdata(pci, NULL);
 err_acquire_irq:
-- 
2.25.1


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

* Re: [PATCH] ASoC: Intel: avs: Fix pci_probe() error path
  2024-02-02 11:49 [PATCH] ASoC: Intel: avs: Fix pci_probe() error path Cezary Rojewski
@ 2024-02-05 16:58 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2024-02-05 16:58 UTC (permalink / raw)
  To: Cezary Rojewski
  Cc: alsa-devel, linux-sound, tiwai, perex, amadeuszx.slawinski,
	pierre-louis.bossart, hdegoede

On Fri, 02 Feb 2024 12:49:01 +0100, Cezary Rojewski wrote:
> Recent changes modified operation-order in the probe() function without
> updating its error path accordingly. If snd_hdac_i915_init() exists with
> status EPROBE_DEFER the error path must cleanup allocated IRQs before
> leaving the scope.
> 
> 

Applied to

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

Thanks!

[1/1] ASoC: Intel: avs: Fix pci_probe() error path
      commit: b5fbde22684af5456d1de60758950944d69d69ad

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] 2+ messages in thread

end of thread, other threads:[~2024-02-05 16:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-02 11:49 [PATCH] ASoC: Intel: avs: Fix pci_probe() error path Cezary Rojewski
2024-02-05 16:58 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox