All of lore.kernel.org
 help / color / mirror / Atom feed
From: Khalid Aziz <khalid.aziz@oracle.com>
To: tony.luck@intel.com, bp@alien8.de, tglx@linutronix.de,
	mingo@redhat.com, hpa@zytor.com
Cc: x86@kernel.org, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] x86, mce: Print warning if MCE handler fails to register /dev/mcelog
Date: Tue, 09 Apr 2013 12:19:31 -0600	[thread overview]
Message-ID: <1365531571.8447.4.camel@concerto> (raw)

Print a warning if machine check handler fails to register
/dev/mcelog device.


Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
---
 arch/x86/kernel/cpu/mcheck/mce.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 7bc1263..7b4c28c 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -2412,7 +2412,8 @@ static __init int mcheck_init_device(void)
 	register_hotcpu_notifier(&mce_cpu_notifier);
 
 	/* register character device /dev/mcelog */
-	misc_register(&mce_chrdev_device);
+	if (misc_register(&mce_chrdev_device) != 0)
+		pr_warn("Failed to register mcelog device\n");
 
 	return err;
 }
-- 
1.7.10.4




             reply	other threads:[~2013-04-09 18:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-09 18:19 Khalid Aziz [this message]
2013-04-09 18:30 ` [PATCH] x86, mce: Print warning if MCE handler fails to register /dev/mcelog Luck, Tony
2013-04-09 18:52   ` Borislav Petkov
2013-04-09 19:20   ` Khalid Aziz

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=1365531571.8447.4.camel@concerto \
    --to=khalid.aziz@oracle.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=x86@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.