fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / mtd / maps / ocotea.c
index 2f07602..5522eac 100644 (file)
@@ -97,6 +97,7 @@ int __init init_ocotea(void)
                                        ARRAY_SIZE(ocotea_small_partitions));
        } else {
                printk("map probe failed for flash\n");
+               iounmap(ocotea_small_map.virt);
                return -ENXIO;
        }
 
@@ -106,6 +107,7 @@ int __init init_ocotea(void)
 
        if (!ocotea_large_map.virt) {
                printk("Failed to ioremap flash\n");
+               iounmap(ocotea_small_map.virt);
                return -EIO;
        }
 
@@ -118,6 +120,8 @@ int __init init_ocotea(void)
                                        ARRAY_SIZE(ocotea_large_partitions));
        } else {
                printk("map probe failed for flash\n");
+               iounmap(ocotea_small_map.virt);
+               iounmap(ocotea_large_map.virt);
                return -ENXIO;
        }