diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-08-13 10:16:53 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2007-10-16 09:58:51 -0400 |
commit | f9ff161a14baca1a4ead5f12377ab25b9dd332e1 (patch) | |
tree | 27935085618d1d9a2ca735ad71627dd3fa6a1897 /sound/pci/mixart | |
parent | dee1b66ce4f406d36fef70d1dd4360c5f1d26218 (diff) |
[ALSA] mixart - Check ioremap error
Check ioremap error and handle properly at initialization.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/mixart')
-rw-r--r-- | sound/pci/mixart/mixart.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c index ac007cec0879..c5109547f43f 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, | |||
1317 | mgr->mem[i].phys = pci_resource_start(pci, i); | 1317 | mgr->mem[i].phys = pci_resource_start(pci, i); |
1318 | mgr->mem[i].virt = ioremap_nocache(mgr->mem[i].phys, | 1318 | mgr->mem[i].virt = ioremap_nocache(mgr->mem[i].phys, |
1319 | pci_resource_len(pci, i)); | 1319 | pci_resource_len(pci, i)); |
1320 | if (!mgr->mem[i].virt) { | ||
1321 | printk(KERN_ERR "unable to remap resource 0x%lx\n", | ||
1322 | mgr->mem[i].phys); | ||
1323 | snd_mixart_free(mgr); | ||
1324 | return -EBUSY; | ||
1325 | } | ||
1320 | } | 1326 | } |
1321 | 1327 | ||
1322 | if (request_irq(pci->irq, snd_mixart_interrupt, IRQF_SHARED, | 1328 | if (request_irq(pci->irq, snd_mixart_interrupt, IRQF_SHARED, |