ALSA: hda: Intel: Fix error handling in azx_probe()
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Mon, 9 Oct 2023 11:54:29 +0000 (13:54 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 19 Oct 2023 12:54:57 +0000 (14:54 +0200)
Add missing pci_set_drv to NULL call on error.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20231009115437.99976-6-maarten.lankhorst@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_intel.c

index e19274fd990d98a906196e05ff6fc73a37336558..e1354ae905564f4988ca81291b1d01be73c04d8a 100644 (file)
@@ -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;
 }