mtd: ndfc: silence an array underflow static checker warning
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 31 Jul 2014 15:36:20 +0000 (18:36 +0300)
committerBrian Norris <computersforpeace@gmail.com>
Tue, 19 Aug 2014 18:53:05 +0000 (11:53 -0700)
We check "cs" for array overflows but we don't check for underflows and
it upsets the static checkers.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/ndfc.c

index 69eaba690a99ff042460bb3d07d50ca55c11ebba..253a644da76a40a740218f876ffdfd3ebc4cd24c 100644 (file)
@@ -203,7 +203,8 @@ static int ndfc_probe(struct platform_device *ofdev)
        struct ndfc_controller *ndfc;
        const __be32 *reg;
        u32 ccr;
-       int err, len, cs;
+       u32 cs;
+       int err, len;
 
        /* Read the reg property to get the chip select */
        reg = of_get_property(ofdev->dev.of_node, "reg", &len);