All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arch/x86/kernel/microcode_core.c: add missing platform_device_unregister
@ 2011-08-24 15:10 ` Julia Lawall
  0 siblings, 0 replies; 8+ messages in thread
From: Julia Lawall @ 2011-08-24 15:10 UTC (permalink / raw)
  To: Tigran Aivazian
  Cc: kernel-janitors, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, linux-kernel

From: Julia Lawall <julia@diku.dk>

Call platform_device_unregister as in the previous error-handling code.

Signed-off-by: Julia Lawall <julia@diku.dk>

---
This is not tested, but I couldn't see how else platform_device_unregister
could be called.

 arch/x86/kernel/microcode_core.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c
index f924280..1872a3a 100644
--- a/arch/x86/kernel/microcode_core.c
+++ b/arch/x86/kernel/microcode_core.c
@@ -532,8 +532,10 @@ static int __init microcode_init(void)
 	}
 
 	error = microcode_dev_init();
-	if (error)
+	if (error) {
+		platform_device_unregister(microcode_pdev);
 		return error;
+	}
 
 	register_syscore_ops(&mc_syscore_ops);
 	register_hotcpu_notifier(&mc_cpu_notifier);


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

end of thread, other threads:[~2011-08-24 16:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-24 15:10 [PATCH] arch/x86/kernel/microcode_core.c: add missing platform_device_unregister Julia Lawall
2011-08-24 15:10 ` Julia Lawall
2011-08-24 15:36 ` Borislav Petkov
2011-08-24 15:36   ` [PATCH] arch/x86/kernel/microcode_core.c: add missing Borislav Petkov
2011-08-24 15:44   ` [PATCH] arch/x86/kernel/microcode_core.c: add missing platform_device_unregister Julia Lawall
2011-08-24 15:44     ` [PATCH] arch/x86/kernel/microcode_core.c: add missing Julia Lawall
2011-08-24 16:33     ` [PATCH] arch/x86/kernel/microcode_core.c: add missing platform_device_unregister Borislav Petkov
2011-08-24 16:33       ` [PATCH] arch/x86/kernel/microcode_core.c: add missing Borislav Petkov

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.