]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Fix another CONFIG_MCA=y oops
authorAndrew Morton <akpm@osdl.org>
Wed, 22 Oct 2003 01:23:09 +0000 (18:23 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Wed, 22 Oct 2003 01:23:09 +0000 (18:23 -0700)
If you have an MCA kernel on non-MCA hardware and load an MCA driver,
mca_find_unused_adapter() ends up dereferencing NULL.

Teach it about the absence of MCA buses.

drivers/mca/mca-legacy.c

index 6e5502923a7454b9f05a5f8d2aca596029bb9709..7c86071ea1f8442c779f59ab8d0ae5e53e193906 100644 (file)
@@ -123,7 +123,7 @@ int mca_find_unused_adapter(int id, int start)
 {
        struct mca_find_adapter_info info = { 0 };
 
-       if(id == 0xffff)
+       if (!MCA_bus || id == 0xffff)
                return MCA_NOTFOUND;
 
        info.slot = start;