Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 87c9e7d7 authored by Alban Bedel's avatar Alban Bedel Committed by Takashi Iwai
Browse files

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: default avatarAlban Bedel <albeu@free.fr>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 068b9394
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -2684,9 +2684,8 @@ 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;
	}

	sprintf(card->longname, "%s at 0x%lx, irq %i",
		card->shortname, chip->ctrl_io, chip->irq);