lkml.org 
[lkml]   [2006]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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/
\
 
 \ /
  Last update: 2006-03-17 10:29    [W:0.064 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site