diff options
Diffstat (limited to 'drivers/mtd/maps/walnut.c')
-rw-r--r-- | drivers/mtd/maps/walnut.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mtd/maps/walnut.c b/drivers/mtd/maps/walnut.c index ec80eec376bf..ca932122fb64 100644 --- a/drivers/mtd/maps/walnut.c +++ b/drivers/mtd/maps/walnut.c | |||
@@ -68,6 +68,7 @@ int __init init_walnut(void) | |||
68 | 68 | ||
69 | if (WALNUT_FLASH_ONBD_N(fpga_brds1)) { | 69 | if (WALNUT_FLASH_ONBD_N(fpga_brds1)) { |
70 | printk("The on-board flash is disabled (U79 sw 5)!"); | 70 | printk("The on-board flash is disabled (U79 sw 5)!"); |
71 | iounmap(fpga_status_adr); | ||
71 | return -EIO; | 72 | return -EIO; |
72 | } | 73 | } |
73 | if (WALNUT_FLASH_SRAM_SEL(fpga_brds1)) | 74 | if (WALNUT_FLASH_SRAM_SEL(fpga_brds1)) |
@@ -81,6 +82,7 @@ int __init init_walnut(void) | |||
81 | 82 | ||
82 | if (!walnut_map.virt) { | 83 | if (!walnut_map.virt) { |
83 | printk("Failed to ioremap flash.\n"); | 84 | printk("Failed to ioremap flash.\n"); |
85 | iounmap(fpga_status_adr); | ||
84 | return -EIO; | 86 | return -EIO; |
85 | } | 87 | } |
86 | 88 | ||
@@ -93,9 +95,11 @@ int __init init_walnut(void) | |||
93 | ARRAY_SIZE(walnut_partitions)); | 95 | ARRAY_SIZE(walnut_partitions)); |
94 | } else { | 96 | } else { |
95 | printk("map probe failed for flash\n"); | 97 | printk("map probe failed for flash\n"); |
98 | iounmap(fpga_status_adr); | ||
96 | return -ENXIO; | 99 | return -ENXIO; |
97 | } | 100 | } |
98 | 101 | ||
102 | iounmap(fpga_status_adr); | ||
99 | return 0; | 103 | return 0; |
100 | } | 104 | } |
101 | 105 | ||