Skip to contentSkip to conversation

mtd: ndfc: silence an array underflow static checker warning

PATCH Applied Dan Carpenter 2 participants 2 messages Jul 31, 2014 – Aug 4, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: ndfc: silence an array underflow static checker warning

We check "cs" for array overflows but we don't check for underflows and it upsets the static checkers.

drivers/mtd/nand/ndfc.c +2 -1
index 69eaba6..253a644 100644
@@ -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);