From b4f309403e4a22d21f29fb1906c67fb4cee62d60 Mon Sep 17 00:00:00 2001 From: Bjorn Helgaas Date: Mon, 22 Sep 2003 01:39:57 -0700 Subject: [PATCH] [PATCH] ia64: bail out of sba_init() if no hardware found This patch against 2.5 gets rid of the following annoying but harmless messages when booting a generic kernel on a non-ZX1 box: No IOC for PCI Bus 0000:00 in ACPI No IOC for PCI Bus 0000:01 in ACPI ... We just forgot to bail out of the SBA IOMMU init function if it didn't find any SBA hardware. --- arch/ia64/hp/common/sba_iommu.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c index fe8278fc8c319..97ae5ad2facf8 100644 --- a/arch/ia64/hp/common/sba_iommu.c +++ b/arch/ia64/hp/common/sba_iommu.c @@ -1849,18 +1849,19 @@ static struct file_operations ioc_map_fops = { static void __init ioc_proc_init(void) { - if (ioc_list) { - struct proc_dir_entry *dir, *entry; + struct proc_dir_entry *dir, *entry; - dir = proc_mkdir("bus/mckinley", 0); - entry = create_proc_entry(ioc_list->name, 0, dir); - if (entry) - entry->proc_fops = &ioc_fops; + dir = proc_mkdir("bus/mckinley", 0); + if (!dir) + return; - entry = create_proc_entry("bitmap", 0, dir); - if (entry) - entry->proc_fops = &ioc_map_fops; - } + entry = create_proc_entry(ioc_list->name, 0, dir); + if (entry) + entry->proc_fops = &ioc_fops; + + entry = create_proc_entry("bitmap", 0, dir); + if (entry) + entry->proc_fops = &ioc_map_fops; } #endif @@ -1946,6 +1947,8 @@ static int __init sba_init(void) { acpi_bus_register_driver(&acpi_sba_ioc_driver); + if (!ioc_list) + return 0; #ifdef CONFIG_PCI { -- 2.53.0