[PATCH] x86, mce: Print warning if MCE handler fails to register/dev/mcelog

From: Khalid Aziz
Date: Tue Apr 09 2013 - 14:20:37 EST


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


Signed-off-by: Khalid Aziz <khalid.aziz@xxxxxxxxxx>
---
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



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/