All of lore.kernel.org
 help / color / mirror / Atom feed
* [Kernel-janitors] [PATCH] h8.c (maybe)
@ 2004-05-02 14:45 MJK
  2004-05-25  8:56 ` maximilian attems
  2004-07-12 11:06 ` maximilian attems
  0 siblings, 2 replies; 3+ messages in thread
From: MJK @ 2004-05-02 14:45 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: TEXT/PLAIN, Size: 274 bytes --]


	Added code in case kernel_thread fails. I also can't test this. I
can't seem to locate the uCLinux files necessary to compile the kernel and
include these. If it's already in the 2.6.5 kernel, can someone tell me
where or how to trick menuconfig to add these in? :)

--MJK

[-- Attachment #2: Type: TEXT/PLAIN, Size: 771 bytes --]

--- old.linux-2.6.5/drivers/char/h8.c	2004-04-03 20:36:55.000000000 -0700
+++ linux-2.6.5/drivers/char/h8.c	2004-05-02 07:46:55.000000000 -0600
@@ -289,6 +289,8 @@
 
 static int __init h8_init(void)
 {
+	int ret;
+
         if(request_irq(h8_irq, h8_intr, SA_INTERRUPT, "h8", NULL))
         {
                 printk(KERN_ERR "H8: error: IRQ %d is not free\n", h8_irq);
@@ -308,7 +310,14 @@
 
 	h8_hw_init();
 
-	kernel_thread(h8_monitor_thread, NULL, 0);
+	ret = kernel_thread(h8_monitor_thread, NULL, 0) < 0);
+	if(ret < 0) {
+		printk(KERN_ERR "H8: error: cannot create monitor thread\n");
+		remove_proc_entry("driver/h8", NULL);
+	        release_region(h8_base, 8);	
+		free_irq(h8_irq, NULL);
+		return ret;
+	}
 
         return 0;
 }

[-- Attachment #3: Type: text/plain, Size: 167 bytes --]

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

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

end of thread, other threads:[~2004-07-12 11:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-02 14:45 [Kernel-janitors] [PATCH] h8.c (maybe) MJK
2004-05-25  8:56 ` maximilian attems
2004-07-12 11:06 ` maximilian attems

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.