X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=drivers%2Fmtd%2Finftlcore.c;h=73f05227dc8cb0607d11c6709a2233959f65d92a;hb=353816f43d1fb340ff2d9a911dd5d0799c09f6a5;hp=50ce13887f63b6b81d2525a5070fbfc511643b1c;hpb=a5a64498c194c82ecad3a2d67cff6231cda8d3dd;p=linux-2.6-omap-h63xx.git diff --git a/drivers/mtd/inftlcore.c b/drivers/mtd/inftlcore.c index 50ce13887f6..73f05227dc8 100644 --- a/drivers/mtd/inftlcore.c +++ b/drivers/mtd/inftlcore.c @@ -50,7 +50,7 @@ static void inftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) struct INFTLrecord *inftl; 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))