Skip to content

Commit

Permalink
ALSA: azt3328 - Fix NULL ptr dereference on cards without OPL3
Browse files Browse the repository at this point in the history
opl3->private_data was set even if opl3 could not be created.

Signed-off-by: Alban Bedel <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
AlbanBedel authored and tiwai committed Feb 25, 2012
1 parent 068b939 commit 87c9e7d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sound/pci/azt3328.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 87c9e7d

Please sign in to comment.