]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/mtd/nftlcore.c
Merge branch 'master' of git://git.infradead.org/users/dedekind/mtd-tests-2.6
[linux-2.6-omap-h63xx.git] / drivers / mtd / nftlcore.c
index 320b929abe795ea00eb5bf4c130f6db966d32893..d1c4546513f7ac88706646eb8e04083ec4bc465a 100644 (file)
@@ -39,7 +39,7 @@ static void nftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
        struct NFTLrecord *nftl;
        unsigned long temp;
 
-       if (mtd->type != MTD_NANDFLASH)
+       if (mtd->type != MTD_NANDFLASH || mtd->size > UINT_MAX)
                return;
        /* OK, this is moderately ugly.  But probably safe.  Alternatives? */
        if (memcmp(mtd->name, "DiskOnChip", 10))