Commit f9ff161a authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela

[ALSA] mixart - Check ioremap error

Check ioremap error and handle properly at initialization.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@suse.cz>
parent dee1b66c
...@@ -1317,6 +1317,12 @@ static int __devinit snd_mixart_probe(struct pci_dev *pci, ...@@ -1317,6 +1317,12 @@ static int __devinit snd_mixart_probe(struct pci_dev *pci,
mgr->mem[i].phys = pci_resource_start(pci, i); mgr->mem[i].phys = pci_resource_start(pci, i);
mgr->mem[i].virt = ioremap_nocache(mgr->mem[i].phys, mgr->mem[i].virt = ioremap_nocache(mgr->mem[i].phys,
pci_resource_len(pci, i)); pci_resource_len(pci, i));
if (!mgr->mem[i].virt) {
printk(KERN_ERR "unable to remap resource 0x%lx\n",
mgr->mem[i].phys);
snd_mixart_free(mgr);
return -EBUSY;
}
} }
if (request_irq(pci->irq, snd_mixart_interrupt, IRQF_SHARED, if (request_irq(pci->irq, snd_mixart_interrupt, IRQF_SHARED,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment