All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darren Jenkins\\" <darrenrjenkins@gmail.com>
To: kernel-janitors@vger.kernel.org
Subject: [KJ][Patch] check return value of request region in ali5455.c
Date: Wed, 01 Mar 2006 07:12:15 +0000	[thread overview]
Message-ID: <1141197136.7784.5.camel@localhost.localdomain> (raw)
In-Reply-To: <1141029654.7765.6.camel@localhost.localdomain>

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

G'day list,

ali5455.c calls request_region without checking it's return value 
@ line 3460.

The patch below simply checks the return value and copies local error
style.

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 17:58:35.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

  reply	other threads:[~2006-03-01  7:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-27  8:40 [KJ][Patch] check return value of request_region in matroxfb_base.c Darren Jenkins\
2006-03-01  7:12 ` Darren Jenkins\ [this message]
2006-03-03  6:31 ` [KJ][Patch] check return value of request_region in Petr Vandrovec
2006-03-11 13:48 ` [KJ][Patch] check return value of request_irq in amiserial.c Darren Jenkins\
2006-03-13  4:37 ` [KJ][Patch] check return value of request_irq in pcnet_cs.c Darren Jenkins\
2006-03-13  5:00 ` Randy.Dunlap
2006-03-13  5:16 ` Darren Jenkins\
2006-03-13  5:27 ` Randy.Dunlap
2006-03-13  6:16 ` Darren Jenkins\
2006-03-13 11:56 ` [KJ][Patch] check return value of request_irq in i82365.c Darren Jenkins\
2006-03-13 12:29 ` Tobias Klauser
2006-03-14  8:44 ` Darren Jenkins\
2006-03-14 16:26 ` Randy.Dunlap
2006-03-15  7:02 ` Darren Jenkins\
2006-03-15  7:32 ` Nishanth Aravamudan
2006-03-15 12:46 ` [KJ][Patch] check return value of request_region and request_irq Darren Jenkins\
2006-03-15 12:57 ` Tobias Klauser
2006-03-16 10:45 ` [KJ][Patch] check return value of request_region and Darren Jenkins\

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1141197136.7784.5.camel@localhost.localdomain \
    --to=darrenrjenkins@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.