X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmtd%2Fmaps%2Focotea.c;h=5522eac8c980854de80f5805a14fdee25986561f;hb=bb84c1a199558962edf4b4aeb4480fb09aa09b91;hp=a21fcd195ab40ddd1b2692c889bdc473131f711c;hpb=f27f0a045b79de5729d064497e21a70871f1d6fe;p=linux-2.6 diff --git a/drivers/mtd/maps/ocotea.c b/drivers/mtd/maps/ocotea.c index a21fcd195a..5522eac8c9 100644 --- a/drivers/mtd/maps/ocotea.c +++ b/drivers/mtd/maps/ocotea.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -98,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; } @@ -107,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; } @@ -119,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; }