Skip to contentSkip to conversation

iosapic: missing test after ioremap()?

PATCH New Roel Kluin 1 participant 1 message Jul 30, 2009

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 iosapic: missing test after ioremap()?

Missing test after ioremap()

---
Shouldn't we test whether ioremap failed?

arch/ia64/kernel/iosapic.c +4 -0
index c48b03f..dab4d39 100644
@@ -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);