public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3.0]isdn add audit to request_region
@ 2011-10-25  8:18 Jimmy Pan
  2011-10-25  9:22 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Jimmy Pan @ 2011-10-25  8:18 UTC (permalink / raw)
  To: kernel-janitors

Add three audit for request_region() function.
Mere newbie here, I don't know if my style of posting and developing is correct.
If anything I've done wrong, please correct me.

--- linux-3.0_build/drivers/isdn/sc/init.c	2011-07-22 10:17:23.000000000 +0800
+++ linux-3.0/drivers/isdn/sc/init.c	2011-10-25 14:22:14.475039218 +0800
@@ -349,19 +349,22 @@ static int __init sc_init(void)
 		sc_adapter[cinst]->iobase = io[b];
 		for(i = 0 ; i < MAX_IO_REGS - 1 ; i++) {
 			sc_adapter[cinst]->ioport[i] = io[b] + i * 0x400;
-			request_region(sc_adapter[cinst]->ioport[i], 1,
-					interface->id);
+			if (!request_region(sc_adapter[cinst]->ioport[i], 1,
+					    interface->id))
+				pr_debug("request_region failed\n");
 			pr_debug("Requesting I/O Port %#x\n",
 				sc_adapter[cinst]->ioport[i]);
 		}
 		sc_adapter[cinst]->ioport[IRQ_SELECT] = io[b] + 0x2;
-		request_region(sc_adapter[cinst]->ioport[IRQ_SELECT], 1,
-				interface->id);
+		if (!request_region(sc_adapter[cinst]->ioport[IRQ_SELECT], 1,
+				    interface->id))
+			pr_debug("request_region failed\n");
 		pr_debug("Requesting I/O Port %#x\n",
 				sc_adapter[cinst]->ioport[IRQ_SELECT]);
 		sc_adapter[cinst]->rambase = ram[b];
-		request_region(sc_adapter[cinst]->rambase, SRAM_PAGESIZE,
-				interface->id);
+		if (!request_region(sc_adapter[cinst]->rambase, SRAM_PAGESIZE,
+				    interface->id))
+			pr_debug("request_region failed\n");

 		pr_info("  %s (%d) - %s %d channels IRQ %d, I/O Base 0x%x, RAM Base
0x%lx\n",
 			sc_adapter[cinst]->devicename,

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

end of thread, other threads:[~2011-10-25  9:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-25  8:18 [PATCH 3.0]isdn add audit to request_region Jimmy Pan
2011-10-25  9:22 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox