[tip:x86/apic] x86: fix IO APIC resource allocation error message

From: Bartlomiej Zolnierkiewicz
Date: Fri Mar 20 2009 - 16:04:21 EST


Commit-ID: 04c93ce4991fce731dab346d03964504339347db
Gitweb: http://git.kernel.org/tip/04c93ce4991fce731dab346d03964504339347db
Author: Bartlomiej Zolnierkiewicz <bzolnier@xxxxxxxxx>
AuthorDate: Fri, 20 Mar 2009 21:02:55 +0100
Committer: Ingo Molnar <mingo@xxxxxxx>
CommitDate: Fri, 20 Mar 2009 21:02:55 +0100

x86: fix IO APIC resource allocation error message

Impact: fix incorrect error message

- IO APIC resource allocation error message contains one too many "be".

- Print the error message iff there are IO APICs in the system.

I've seen this error message for some time on my x86-32 laptop...

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@xxxxxxxxx>
Cc: Alan Bartlett <ajb.stxsl@xxxxxxxxxxxxxx>
LKML-Reference: <200903202100.30789.bzolnier@xxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>


---
arch/x86/kernel/apic/io_apic.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 42cdc78..d882c03 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -4130,9 +4130,12 @@ static int __init ioapic_insert_resources(void)
struct resource *r = ioapic_resources;

if (!r) {
- printk(KERN_ERR
- "IO APIC resources could be not be allocated.\n");
- return -1;
+ if (nr_ioapics > 0) {
+ printk(KERN_ERR
+ "IO APIC resources couldn't be allocated.\n");
+ return -1;
+ }
+ return 0;
}

for (i = 0; i < nr_ioapics; i++) {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/