Skip to contentSkip to conversation

ALSA: azt3328 - Fix NULL ptr dereference on cards without OPL3

PATCH Takashi Iwai 1 participant 1 message Feb 25, 2012 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Takashi Iwai

author Applied
#1 lore raw

At Sat, 25 Feb 2012 16:15:57 +0100,

Quoted 4 lines · Alban Bedel

opl3->private_data was set even if opl3 could not be created.

Thanks, applied now.

Takashi

Quoted 23 lines
---
 sound/pci/azt3328.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
sound/pci/azt3328.c +1 -2
index 95ffa6a..496f14c 100644
@@ -2684,10 +2684,9 @@ snd_azf3328_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
 		err = snd_opl3_hwdep_new(opl3, 0, 1, NULL);
 		if (err < 0)
 			goto out_err;
+		opl3->private_data = chip;
 	}
 
-	opl3->private_data = chip;
-
 	sprintf(card->longname, "%s at 0x%lx, irq %i",
 		card->shortname, chip->ctrl_io, chip->irq);
 
Signature · 1 line
1.7.1