Skip to content

Commit ba02b24

Browse files
akpm00jbarnes993
authored andcommitted
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>
1 parent 939fdc6 commit ba02b24

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎drivers/pci/hotplug/ibmphp_ebda.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,8 @@ int __init ibmphp_access_ebda (void)
261261
debug ("returned ebda segment: %x\n", ebda_seg);
262262

263263
io_mem = ioremap(ebda_seg<<4, 1);
264+
if (!io_mem)
265+
return -ENOMEM;
264266
ebda_sz = readb(io_mem);
265267
iounmap(io_mem);
266268
debug("ebda size: %d(KiB)\n", ebda_sz);

0 commit comments

Comments
 (0)