From dd329e9e50e884173f3bee7916d9a9a463b79340 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Tue, 21 Oct 2003 18:23:09 -0700 Subject: [PATCH] [PATCH] Fix another CONFIG_MCA=y oops 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mca/mca-legacy.c b/drivers/mca/mca-legacy.c index 6e5502923a745..7c86071ea1f84 100644 --- a/drivers/mca/mca-legacy.c +++ b/drivers/mca/mca-legacy.c @@ -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; -- 2.53.0