[016/145] PCI hotplug: check ioremap() return value in ibmphp_ebda.c
From: Greg KH
Date: Fri Mar 12 2010 - 20:12:59 EST
2.6.32-stable review patch. If anyone has any objections, please let me know.
----------------
From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
commit ba02b242bbf8e4e1bc63d62e8ccec33b4e5ea132 upstream.
check ioremap() return value.
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
drivers/pci/hotplug/ibmphp_ebda.c | 2 ++
1 file changed, 2 insertions(+)
--- 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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/