public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/mce: Check misc_register() return code.
@ 2014-04-25  9:48 Mathieu Souchaud
  2014-04-25 10:42 ` Borislav Petkov
  0 siblings, 1 reply; 3+ messages in thread
From: Mathieu Souchaud @ 2014-04-25  9:48 UTC (permalink / raw)
  To: tony.luck, bp, tglx, mingo, hpa, x86, linux-edac, linux-kernel,
	kernel-janitors
  Cc: Mathieu Souchaud

The current code does not check the return from misc_register() so set
the return variable with the return code of misc_register.

Signed-off-by: Mathieu Souchaud <mattieu.souchaud@free.fr>
---
 arch/x86/kernel/cpu/mcheck/mce.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 68317c8..45fb7aa 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -2462,7 +2462,7 @@ static __init int mcheck_init_device(void)
 	cpu_notifier_register_done();
 
 	/* register character device /dev/mcelog */
-	misc_register(&mce_chrdev_device);
+	err = misc_register(&mce_chrdev_device);
 
 	return err;
 }
-- 
1.7.9.5


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

end of thread, other threads:[~2014-04-25 11:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-25  9:48 [PATCH] x86/mce: Check misc_register() return code Mathieu Souchaud
2014-04-25 10:42 ` Borislav Petkov
2014-04-25 11:53   ` mathieu souchaud

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox