ALSA: intel8x0: Check pci_iomap() success for DEVICE_ALI
authorScott Wood <scottwood@freescale.com>
Wed, 15 Apr 2015 23:16:47 +0000 (18:16 -0500)
committerTakashi Iwai <tiwai@suse.de>
Thu, 16 Apr 2015 08:15:44 +0000 (10:15 +0200)
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>
sound/pci/intel8x0.c

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