Messages in this thread Patch in this message | | | Date | Fri, 17 Mar 2006 10:24:47 +0100 | From | l.wandrebeck@free ... | Subject | [patch 1/1] OSS ali5455 missing return check for request_region() |
| |
Hi, in sound/oss/ali5455.c, request_region() is called without checking the return value. Here is a simple patch to fix it. Please apply, even if OSS is aimed at /dev/null some day :-) Patch applies cleanly on 2.6.16-rc6 and 2.6.16-rc6-git8. Regards.
Signed-off-by: Laurent Wandrebeck <l.wandrebeck@free.fr>
--- linux-2.6.16-rc6-low/sound/oss/ali5455.c.ori 2006-03-11 23:12:55.000000000 +0100 +++ linux-2.6.16-rc6-low/sound/oss/ali5455.c 2006-03-16 23:45:27.316837000 +0100 @@ -3457,7 +3457,12 @@ static int __devinit ali_probe(struct pc card->channel[4].port = 0xb0; card->channel[4].num = 4; /* claim our iospace and irq */ - request_region(card->iobase, 256, card_names[pci_id->driver_data]); + if (request_region(card->iobase, 256, card_names[pci_id->driver_data]) < 0) { + printk(KERN_ERR "ali_audio: unable to reserve region %d\n", + card->iobase); + kfree(card); + return -ENODEV; + } if (request_irq(card->irq, &ali_interrupt, SA_SHIRQ, card_names[pci_id->driver_data], card)) { printk(KERN_ERR "ali_audio: unable to allocate irq %d\n", - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |