]> git.hungrycats.org Git - linux/commitdiff
[PATCH] MCA: handle bus failure
authorAndrew Morton <akpm@osdl.org>
Tue, 20 Jan 2004 11:15:09 +0000 (03:15 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Tue, 20 Jan 2004 11:15:09 +0000 (03:15 -0800)
From: "Randy.Dunlap" <rddunlap@osdl.org>
From: Eugene TEO <eugeneteo@eugeneteo.net>

Handle OOM in mca_init()

arch/i386/kernel/mca.c

index 57d118e4d6e58eeb600379c1c6ad15e1113136a6..a03d3681080593e733747f1c6dd65101e703fcff 100644 (file)
@@ -270,6 +270,8 @@ static int __init mca_init(void)
 
        /* All MCA systems have at least a primary bus */
        bus = mca_attach_bus(MCA_PRIMARY_BUS);
+       if (!bus)
+               goto out_nomem;
        bus->default_dma_mask = 0xffffffffLL;
        bus->f.mca_write_pos = mca_pc_write_pos;
        bus->f.mca_read_pos = mca_pc_read_pos;