[Intel-xe] [PATCH 07/15] ALSA: hda: Intel: Fix error handling in azx_probe()

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Mon Oct 23 11:17:21 UTC 2023


Add missing pci_set_drv to NULL call on error.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi at linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen at linux.intel.com>
Link: https://lore.kernel.org/r/20231009115437.99976-6-maarten.lankhorst@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai at suse.de>
(cherry picked from commit ad6413bc48f2a86847614b48a7a575f75d2521a5)
---
 sound/pci/hda/hda_intel.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 7382e5833b3b5..12caabf54c63c 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2176,6 +2176,7 @@ static int azx_probe(struct pci_dev *pci,
 	return 0;
 
 out_free:
+	pci_set_drvdata(pci, NULL);
 	snd_card_free(card);
 	return err;
 }
-- 
2.39.2



More information about the Intel-xe mailing list