浏览代码

ALSA: ice1712: Initialize card->private_data properly

Set card->private_data in snd_ice1712_create for fixing NULL
dereference in snd_ice1712_remove().

Signed-off-by: Sean Connor <sconnor004@allyinics.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Sean Connor 12 年之前
父节点
当前提交
69a4cfdd44
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      sound/pci/ice1712/ice1712.c

+ 2 - 0
sound/pci/ice1712/ice1712.c

@@ -2594,6 +2594,8 @@ static int snd_ice1712_create(struct snd_card *card,
 	snd_ice1712_proc_init(ice);
 	synchronize_irq(pci->irq);
 
+	card->private_data = ice;
+
 	err = pci_request_regions(pci, "ICE1712");
 	if (err < 0) {
 		kfree(ice);