summaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/ibmphp_ebda.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/hotplug/ibmphp_ebda.c')
-rw-r--r--drivers/pci/hotplug/ibmphp_ebda.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pci/hotplug/ibmphp_ebda.c b/drivers/pci/hotplug/ibmphp_ebda.c
index 7d3bf31d224..5becbdee402 100644
--- a/drivers/pci/hotplug/ibmphp_ebda.c
+++ b/drivers/pci/hotplug/ibmphp_ebda.c
@@ -261,6 +261,8 @@ int __init ibmphp_access_ebda (void)
debug ("returned ebda segment: %x\n", ebda_seg);
io_mem = ioremap(ebda_seg<<4, 1);
+ if (!io_mem)
+ return -ENOMEM;
ebda_sz = readb(io_mem);
iounmap(io_mem);
debug("ebda size: %d(KiB)\n", ebda_sz);