aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bcma/scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bcma/scan.c')
-rw-r--r--drivers/bcma/scan.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/bcma/scan.c b/drivers/bcma/scan.c
index b4764c6bcf17..e9bd77249a4c 100644
--- a/drivers/bcma/scan.c
+++ b/drivers/bcma/scan.c
@@ -421,10 +421,13 @@ static int bcma_get_next_core(struct bcma_bus *bus, u32 __iomem **eromptr,
421 core->io_addr = ioremap_nocache(core->addr, BCMA_CORE_SIZE); 421 core->io_addr = ioremap_nocache(core->addr, BCMA_CORE_SIZE);
422 if (!core->io_addr) 422 if (!core->io_addr)
423 return -ENOMEM; 423 return -ENOMEM;
424 core->io_wrap = ioremap_nocache(core->wrap, BCMA_CORE_SIZE); 424 if (core->wrap) {
425 if (!core->io_wrap) { 425 core->io_wrap = ioremap_nocache(core->wrap,
426 iounmap(core->io_addr); 426 BCMA_CORE_SIZE);
427 return -ENOMEM; 427 if (!core->io_wrap) {
428 iounmap(core->io_addr);
429 return -ENOMEM;
430 }
428 } 431 }
429 } 432 }
430 return 0; 433 return 0;