Commit 9c2a5b7c authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ftl.c warning fix

From: Adrian Bunk <bunk@fs.tum.de>

A 16bit number can _never_ be > 65536.  So don't bother to check for it.
parent ac0151e3
......@@ -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");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment