diff mbox series

ASoC: Intel: avs: Fix pci_probe() error path

Message ID 20240202114901.1002127-1-cezary.rojewski@intel.com (mailing list archive)
State Accepted
Commit b5fbde22684af5456d1de60758950944d69d69ad
Headers show
Series ASoC: Intel: avs: Fix pci_probe() error path | expand

Commit Message

Cezary Rojewski Feb. 2, 2024, 11:49 a.m. UTC
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(+)

Comments

Mark Brown Feb. 5, 2024, 4:58 p.m. UTC | #1
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
diff mbox series

Patch

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: