From: Andrew Morton Date: Tue, 2 Feb 2010 22:45:54 +0000 (-0800) Subject: PCI hotplug: check ioremap() return value in ibmphp_ebda.c X-Git-Tag: v2.6.33.1~120 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9bd97ecab811f5bce4a0e9d7e316d2559fa4be65;p=karo-tx-linux.git PCI hotplug: check ioremap() return value in ibmphp_ebda.c commit ba02b242bbf8e4e1bc63d62e8ccec33b4e5ea132 upstream. check ioremap() return value. Signed-off-by: Andrew Morton Signed-off-by: Jesse Barnes Signed-off-by: Greg Kroah-Hartman --- 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);