diff options
| author | Alban Bedel <albeu@free.fr> | 2012-02-25 10:15:57 -0500 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2012-02-25 13:03:18 -0500 |
| commit | 87c9e7d7027643bf248b396c15c804456e967fcd (patch) | |
| tree | 075b11728490d485cd761ff529b1ecf830c1b205 | |
| parent | 068b939431486f524438330b0848a8222e33d421 (diff) | |
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>
| -rw-r--r-- | sound/pci/azt3328.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/pci/azt3328.c b/sound/pci/azt3328.c index 95ffa6a9db6e..496f14c1a731 100644 --- a/sound/pci/azt3328.c +++ b/sound/pci/azt3328.c | |||
| @@ -2684,10 +2684,9 @@ snd_azf3328_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) | |||
| 2684 | err = snd_opl3_hwdep_new(opl3, 0, 1, NULL); | 2684 | err = snd_opl3_hwdep_new(opl3, 0, 1, NULL); |
| 2685 | if (err < 0) | 2685 | if (err < 0) |
| 2686 | goto out_err; | 2686 | goto out_err; |
| 2687 | opl3->private_data = chip; | ||
| 2687 | } | 2688 | } |
| 2688 | 2689 | ||
| 2689 | opl3->private_data = chip; | ||
| 2690 | |||
| 2691 | sprintf(card->longname, "%s at 0x%lx, irq %i", | 2690 | sprintf(card->longname, "%s at 0x%lx, irq %i", |
| 2692 | card->shortname, chip->ctrl_io, chip->irq); | 2691 | card->shortname, chip->ctrl_io, chip->irq); |
| 2693 | 2692 | ||
