All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Teti <paolo.teti@gmail.com>
To: kernel-janitors@vger.kernel.org
Subject: [KJ][PATCH] linux-2.6.15-rc2 apm_emu.c audit misc_register() ret. code
Date: Wed, 23 Nov 2005 08:09:04 +0000	[thread overview]
Message-ID: <34a7ae040511230009j20cff459r@mail.gmail.com> (raw)

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

             reply	other threads:[~2005-11-23  8:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-23  8:09 Paolo Teti [this message]
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

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=34a7ae040511230009j20cff459r@mail.gmail.com \
    --to=paolo.teti@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.