public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] init. mca_bus_type even if !MCA_bus
@ 2004-05-17 21:46 Randy.Dunlap
  2004-05-17 22:14 ` Andrew Morton
  0 siblings, 1 reply; 8+ messages in thread
From: Randy.Dunlap @ 2004-05-17 21:46 UTC (permalink / raw)
  To: lkml; +Cc: akpm, jejb


// Linux 2.6.6
// need to call mca_system_init() to register MCA bus struct,
// otherwise find_mca_adapter() oopses with a NULL ptr.
// Fixes this oops reported last week:
//	http://marc.theaimsgroup.com/?l=linux-kernel&m=108455738606747&w=2
// Thanks to James Bottomley for pointing this out.

diffstat:=
 arch/i386/kernel/mca.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)


diff -Naurp ./arch/i386/kernel/mca.c~check_mca_bus ./arch/i386/kernel/mca.c
--- ./arch/i386/kernel/mca.c~check_mca_bus	2004-05-09 19:33:05.000000000 -0700
+++ ./arch/i386/kernel/mca.c	2004-05-17 14:50:32.000000000 -0700
@@ -258,16 +258,16 @@ static int __init mca_init(void)
 
 	/* Make sure the MCA bus is present */
 
-	if(!MCA_bus)
-		return -ENODEV;
-
-	printk(KERN_INFO "Micro Channel bus detected.\n");
-
-	if(mca_system_init()) {
+	if (mca_system_init()) {
 		printk(KERN_ERR "MCA bus system initialisation failed\n");
 		return -ENODEV;
 	}
 
+	if (!MCA_bus)
+		return -ENODEV;
+
+	printk(KERN_INFO "Micro Channel bus detected.\n");
+
 	/* All MCA systems have at least a primary bus */
 	bus = mca_attach_bus(MCA_PRIMARY_BUS);
 	if (!bus)


--
~Randy

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

end of thread, other threads:[~2004-05-17 23:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-17 21:46 [PATCH] init. mca_bus_type even if !MCA_bus Randy.Dunlap
2004-05-17 22:14 ` Andrew Morton
2004-05-17 22:08   ` Randy.Dunlap
2004-05-17 22:52     ` Andrew Morton
2004-05-17 22:58       ` Greg KH
2004-05-17 23:02       ` James Bottomley
2004-05-17 22:18   ` James Bottomley
2004-05-17 22:56     ` Andrew Morton

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