All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ][PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret. code
@ 2005-11-23  8:09 Paolo Teti
  2005-11-24  7:32 ` [KJ][PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret Christophe Lucas
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Paolo Teti @ 2005-11-23  8:09 UTC (permalink / raw)
  To: kernel-janitors

from: Paolo Teti

fix a missing check on misc_register() return code

Signed-off-by: Paolo Teti <paolo.teti@gmail.com>

---
--- linux-2.6.15-rc2/drivers/macintosh/apm_emu.c.orig	Tue Nov 22 17:37:06 2005
+++ linux-2.6.15-rc2/drivers/macintosh/apm_emu.c	Tue Nov 22 18:03:31 2005
@@ -530,7 +530,11 @@ static int __init apm_emu_init(void)
 	if (apm_proc)
 		apm_proc->owner = THIS_MODULE;

-	misc_register(&apm_device);
+	if (misc_register(&apm_device) != 0) {
+		remove_proc_entry("apm", NULL);
+		printk(KERN_ERR "apm_emu: Failed to register APM Emulation.\n");
+		return -ENODEV;
+	}

 	pmu_register_sleep_notifier(&apm_sleep_notifier);

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

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [KJ] [PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret.
@ 2005-11-22 18:07 Paolo Teti
  0 siblings, 0 replies; 8+ messages in thread
From: Paolo Teti @ 2005-11-22 18:07 UTC (permalink / raw)
  To: kernel-janitors

from: Paolo Teti

fix a missing check on misc_register() return code

Signed-off-by: Paolo Teti <tetipaol@libero.it>

---
--- linux-2.6.15-rc2/drivers/macintosh/apm_emu.c.orig	Tue Nov 22 17:37:06 2005
+++ linux-2.6.15-rc2/drivers/macintosh/apm_emu.c	Tue Nov 22 18:03:31 2005
@@ -530,7 +530,11 @@ static int __init apm_emu_init(void)
 	if (apm_proc)
 		apm_proc->owner = THIS_MODULE;
 
-	misc_register(&apm_device);
+	if (misc_register(&apm_device) != 0) {
+		remove_proc_entry("apm", NULL);
+		printk(KERN_ERR "apm_emu: Failed to register APM Emulation.\n");
+		return -ENODEV;
+	}
 
 	pmu_register_sleep_notifier(&apm_sleep_notifier);
 



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

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

end of thread, other threads:[~2005-11-28 12:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-23  8:09 [KJ][PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret. code Paolo Teti
2005-11-24  7:32 ` [KJ][PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret Christophe Lucas
2005-11-24  8:02 ` Paolo Teti
2005-11-26 20:39 ` Alexey Dobriyan
2005-11-28 10:34 ` Paolo Teti
2005-11-28 11:25 ` Christophe Lucas
2005-11-28 12:53 ` Paolo Teti
  -- strict thread matches above, loose matches on Subject: below --
2005-11-22 18:07 [KJ] [PATCH] " Paolo Teti

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.