Backport [7224] to the adm5120 flash map driver
authorFlorian Fainelli <florian@openwrt.org>
Fri, 18 May 2007 09:29:39 +0000 (09:29 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Fri, 18 May 2007 09:29:39 +0000 (09:29 +0000)
SVN-Revision: 7270

target/linux/adm5120-2.6/files/drivers/mtd/maps/adm5120_mtd.c

index a353926746dcd853022e0b9633bbb1a914047017..a1737d7020df5761b2e794e0bafe2a9ddc891b15 100644 (file)
@@ -391,10 +391,8 @@ init_mtd_partitions(struct mtd_info *mtd, size_t size)
        }
 
        /* find and size rootfs */
-       if (find_root(mtd,size,&adm5120_cfe_parts[2])==0) {
-               adm5120_cfe_parts[2].size = size - adm5120_cfe_parts[2].offset -
-                               adm5120_cfe_parts[3].size;
-       }
+       find_root(mtd,size,&adm5120_cfe_parts[2]);
+       adm5120_cfe_parts[2].size = size - adm5120_cfe_parts[2].offset - adm5120_cfe_parts[3].size;
 
        return adm5120_cfe_parts;
 }