X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Foss%2Fi810_audio.c;h=47e5bed02bb0715911be378d3b58833acfd4deac;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=918c2a23b679ab6259882aa8115d918c0f50584c;hpb=a2c21200f1c81b08cb55e417b68150bba439b646;p=linux-2.6.git diff --git a/sound/oss/i810_audio.c b/sound/oss/i810_audio.c index 918c2a23b..47e5bed02 100644 --- a/sound/oss/i810_audio.c +++ b/sound/oss/i810_audio.c @@ -101,7 +101,6 @@ #include #include #include -#include #define DRIVER_VERSION "1.01" @@ -3216,8 +3215,14 @@ static int __devinit i810_probe(struct pci_dev *pci_dev, const struct pci_device } /* claim our iospace and irq */ - request_region(card->iobase, 64, card_names[pci_id->driver_data]); - request_region(card->ac97base, 256, card_names[pci_id->driver_data]); + if (!request_region(card->iobase, 64, card_names[pci_id->driver_data])) { + printk(KERN_ERR "i810_audio: unable to allocate region %lx\n", card->iobase); + goto out_region1; + } + if (!request_region(card->ac97base, 256, card_names[pci_id->driver_data])) { + printk(KERN_ERR "i810_audio: unable to allocate region %lx\n", card->ac97base); + goto out_region2; + } if (request_irq(card->irq, &i810_interrupt, SA_SHIRQ, card_names[pci_id->driver_data], card)) { @@ -3291,7 +3296,9 @@ out_iospace: } out_pio: release_region(card->iobase, 64); +out_region2: release_region(card->ac97base, 256); +out_region1: pci_free_consistent(pci_dev, sizeof(struct i810_channel)*NR_HW_CH, card->channel, card->chandma); out_mem: