mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-15 13:22:55 +00:00
ALSA: azt3328 - Fix NULL ptr dereference on cards without OPL3
opl3->private_data was set even if opl3 could not be created. Signed-off-by: Alban Bedel <albeu@free.fr> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
068b939431
commit
87c9e7d702
@ -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);
|
err = snd_opl3_hwdep_new(opl3, 0, 1, NULL);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto out_err;
|
goto out_err;
|
||||||
|
opl3->private_data = chip;
|
||||||
}
|
}
|
||||||
|
|
||||||
opl3->private_data = chip;
|
|
||||||
|
|
||||||
sprintf(card->longname, "%s at 0x%lx, irq %i",
|
sprintf(card->longname, "%s at 0x%lx, irq %i",
|
||||||
card->shortname, chip->ctrl_io, chip->irq);
|
card->shortname, chip->ctrl_io, chip->irq);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user