[PATCH v6 04/12] ALSA: hda: Intel: Fix error handling in azx_probe()

From: Maarten Lankhorst
Date: Wed Oct 04 2023 - 10:56:36 EST


Add missing pci_set_drv to NULL call on error.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@xxxxxxxxxxxxxxx>
Reviewed-by: Kai Vehmanen <kai.vehmanen@xxxxxxxxxxxxxxx>
---
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 ca765ac4765f..b4ac0d43c09b 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.40.1