提交 ba02b242 编写于 作者: A Andrew Morton 提交者: Jesse Barnes

PCI hotplug: check ioremap() return value in ibmphp_ebda.c

check ioremap() return value.

Cc: <stable@kernel.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
上级 939fdc67
...@@ -261,6 +261,8 @@ int __init ibmphp_access_ebda (void) ...@@ -261,6 +261,8 @@ int __init ibmphp_access_ebda (void)
debug ("returned ebda segment: %x\n", ebda_seg); debug ("returned ebda segment: %x\n", ebda_seg);
io_mem = ioremap(ebda_seg<<4, 1); io_mem = ioremap(ebda_seg<<4, 1);
if (!io_mem)
return -ENOMEM;
ebda_sz = readb(io_mem); ebda_sz = readb(io_mem);
iounmap(io_mem); iounmap(io_mem);
debug("ebda size: %d(KiB)\n", ebda_sz); debug("ebda size: %d(KiB)\n", ebda_sz);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册