kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [KJ][Patch][update] check return value of request_region in
@ 2006-03-01  7:29 Darren Jenkins\
  2006-03-01  8:07 ` Tim Cooijmans
  2006-03-24 12:02 ` [KJ][Patch][update] check return value of request_irq in pcnet_cs.c Darren Jenkins\
  0 siblings, 2 replies; 3+ messages in thread
From: Darren Jenkins\ @ 2006-03-01  7:29 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 1055 bytes --]

G'day list,

Sorry about the last patch I forgot to compile test it first.
Here is the patch you want.

matroxfb_base.c calles 'request_region' @ 1737 without checking the
return value.

The patch below adds a check for this and plugs into the existing error
path.

Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com>

--- linux-2.6.16-rc5/sound/oss/ali5455.c.orig	2006-03-01 17:52:40.000000000 +1100
+++ linux-2.6.16-rc5/sound/oss/ali5455.c	2006-03-01 18:25:34.000000000 +1100
@@ -3457,7 +3457,13 @@ 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])) {
+		printk(KERN_ERR "ali_audio: request_region failed");
+		kfree(card);
+		return -EBUSY;
+	}
+	
 	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",



[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-03-24 12:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-01  7:29 [KJ][Patch][update] check return value of request_region in Darren Jenkins\
2006-03-01  8:07 ` Tim Cooijmans
2006-03-24 12:02 ` [KJ][Patch][update] check return value of request_irq in pcnet_cs.c Darren Jenkins\

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).