]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[ALSA] mixart - Check ioremap error
authorTakashi Iwai <tiwai@suse.de>
Mon, 13 Aug 2007 14:16:53 +0000 (16:16 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 16 Oct 2007 13:58:51 +0000 (15:58 +0200)
Check ioremap error and handle properly at initialization.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
sound/pci/mixart/mixart.c

index ac007cec08791fbcd73f8a014257ea5e96377840..c5109547f43ff5aca1ca59690ec39637fdfec9e9 100644 (file)
@@ -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,