From: Takashi Iwai Date: Mon, 13 Aug 2007 14:16:53 +0000 (+0200) Subject: [ALSA] mixart - Check ioremap error X-Git-Tag: v2.6.24-rc1~832^2~182 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9ff161a14baca1a4ead5f12377ab25b9dd332e1;p=linux-2.6 [ALSA] mixart - Check ioremap error Check ioremap error and handle properly at initialization. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c index ac007cec08..c5109547f4 100644 --- a/sound/pci/mixart/mixart.c +++ b/sound/pci/mixart/mixart.c @@ -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].virt = ioremap_nocache(mgr->mem[i].phys, 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,