]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] ftl.c warning fix
authorAndrew Morton <akpm@osdl.org>
Fri, 1 Aug 2003 03:11:33 +0000 (20:11 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Fri, 1 Aug 2003 03:11:33 +0000 (20:11 -0700)
From: Adrian Bunk <bunk@fs.tum.de>

A 16bit number can _never_ be > 65536.  So don't bother to check for it.

drivers/mtd/ftl.c

index 67649391125ccfc14dde79cc53a029540183dd0a..4e2d14ce4e1e14488835cd3717f0728268b9491b 100644 (file)
@@ -188,7 +188,7 @@ static int scan_header(partition_t *part)
        printk(KERN_NOTICE "ftl_cs: FTL header not found.\n");
        return -ENOENT;
     }
-    if ((le16_to_cpu(header.NumEraseUnits) > 65536) || header.BlockSize != 9 ||
+    if (header.BlockSize != 9 ||
        (header.EraseUnitSize < 10) || (header.EraseUnitSize > 31) ||
        (header.NumTransferUnits >= le16_to_cpu(header.NumEraseUnits))) {
        printk(KERN_NOTICE "ftl_cs: FTL header corrupt!\n");