* [PATCH] iosapic: missing test after ioremap()?
@ 2009-07-30 15:42 Roel Kluin
0 siblings, 0 replies; only message in thread
From: Roel Kluin @ 2009-07-30 15:42 UTC (permalink / raw)
To: linux-ia64
Missing test after ioremap()
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
Shouldn't we test whether ioremap failed?
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c
index c48b03f..dab4d39 100644
--- a/arch/ia64/kernel/iosapic.c
+++ b/arch/ia64/kernel/iosapic.c
@@ -1072,6 +1072,10 @@ iosapic_init (unsigned long phys_addr, unsigned int gsi_base)
}
addr = ioremap(phys_addr, 0);
+ if (addr = NULL) {
+ spin_unlock_irqrestore(&iosapic_lock, flags);
+ return -ENOMEM;
+ }
ver = iosapic_version(addr);
if ((err = iosapic_check_gsi_range(gsi_base, ver))) {
iounmap(addr);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-07-30 15:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-30 15:42 [PATCH] iosapic: missing test after ioremap()? Roel Kluin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.