Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[cascardo/linux.git] / drivers / mtd / chips / cfi_util.c
index 8e46405..f992418 100644 (file)
@@ -173,12 +173,6 @@ int cfi_varsize_frob(struct mtd_info *mtd, varsize_frob_t frob,
        int i, first;
        struct mtd_erase_region_info *regions = mtd->eraseregions;
 
-       if (ofs > mtd->size)
-               return -EINVAL;
-
-       if ((len + ofs) > mtd->size)
-               return -EINVAL;
-
        /* Check that both start and end of the requested erase are
         * aligned with the erasesize at the appropriate addresses.
         */