瀏覽代碼

ALSA: intel8x0: Check pci_iomap() success for DEVICE_ALI

DEVICE_ALI previously would jump to port_inited after calling
pci_iomap(), bypassing the check for bmaddr being NULL.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Scott Wood 10 年之前
父節點
當前提交
3047755588
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      sound/pci/intel8x0.c

+ 2 - 2
sound/pci/intel8x0.c

@@ -3101,13 +3101,13 @@ static int snd_intel8x0_create(struct snd_card *card,
 		chip->bmaddr = pci_iomap(pci, 3, 0);
 		chip->bmaddr = pci_iomap(pci, 3, 0);
 	else
 	else
 		chip->bmaddr = pci_iomap(pci, 1, 0);
 		chip->bmaddr = pci_iomap(pci, 1, 0);
+
+ port_inited:
 	if (!chip->bmaddr) {
 	if (!chip->bmaddr) {
 		dev_err(card->dev, "Controller space ioremap problem\n");
 		dev_err(card->dev, "Controller space ioremap problem\n");
 		snd_intel8x0_free(chip);
 		snd_intel8x0_free(chip);
 		return -EIO;
 		return -EIO;
 	}
 	}
-
- port_inited:
 	chip->bdbars_count = bdbars[device_type];
 	chip->bdbars_count = bdbars[device_type];
 
 
 	/* initialize offsets */
 	/* initialize offsets */