summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2010-02-02 23:45:54 +0100
committerJesse Barnes <jbarnes@virtuousgeek.org>2010-02-23 01:17:19 +0100
commitba02b242bbf8e4e1bc63d62e8ccec33b4e5ea132 (patch)
treed81b48ebf427e0ee346582b8f92ced6017ce9015 /drivers/pci
parentPCI hotplug: fix ibmphp build error (diff)
downloadlinux-ba02b242bbf8e4e1bc63d62e8ccec33b4e5ea132.tar.xz
linux-ba02b242bbf8e4e1bc63d62e8ccec33b4e5ea132.zip
PCI hotplug: check ioremap() return value in ibmphp_ebda.c
check ioremap() return value. Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-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 7d3bf31d224d..5becbdee4027 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);