All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cezary Rojewski <cezary.rojewski@intel.com>
To: broonie@kernel.org
Cc: tiwai@suse.com, perex@perex.cz,
	amadeuszx.slawinski@linux.intel.com, linux-sound@vger.kernel.org,
	Cezary Rojewski <cezary.rojewski@intel.com>
Subject: [PATCH 1/2] ASoC: Intel: avs: Synchronize happy and error paths in PCI probe
Date: Tue, 29 Jul 2025 13:42:28 +0200	[thread overview]
Message-ID: <20250729114229.309472-2-cezary.rojewski@intel.com> (raw)
In-Reply-To: <20250729114229.309472-1-cezary.rojewski@intel.com>

Error path in avs_pci_probe() does not match its happy path.

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
---
 sound/soc/intel/avs/core.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/intel/avs/core.c b/sound/soc/intel/avs/core.c
index 7af324753673..5ea42b5af26f 100644
--- a/sound/soc/intel/avs/core.c
+++ b/sound/soc/intel/avs/core.c
@@ -505,11 +505,11 @@ 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);
+	pci_clear_master(pci);
+	pci_free_irq(pci, 0, adev);
+	pci_free_irq(pci, 0, bus);
+	pci_free_irq_vectors(pci);
 err_acquire_irq:
 	snd_hdac_bus_free_stream_pages(bus);
 	snd_hdac_ext_stream_free_all(bus);
-- 
2.25.1


  reply	other threads:[~2025-07-29 11:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-29 11:42 [PATCH 0/2] ASoC: Intel: avs: Fixes for avs_pci_probe() Cezary Rojewski
2025-07-29 11:42 ` Cezary Rojewski [this message]
2025-07-29 11:47   ` [PATCH 1/2] ASoC: Intel: avs: Synchronize happy and error paths in PCI probe Mark Brown
2025-07-29 12:49     ` Cezary Rojewski
2025-07-29 13:32       ` Mark Brown
2025-07-30 12:32         ` Cezary Rojewski
2025-07-29 11:42 ` [PATCH 2/2] ASoC: Intel: avs: Fix uninitialized pointer error in probe() Cezary Rojewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250729114229.309472-2-cezary.rojewski@intel.com \
    --to=cezary.rojewski@intel.com \
    --cc=amadeuszx.slawinski@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.