From: Dan Carpenter Date: Thu, 31 Jul 2014 15:36:20 +0000 (+0300) Subject: mtd: ndfc: silence an array underflow static checker warning X-Git-Tag: Ubuntu-5.4-5.4.0-11.14~13555^2~33^2~26 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=5828c60826e9422169b3711aa58a583242864cc8;p=mirror_ubuntu-focal-kernel.git 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. Signed-off-by: Dan Carpenter Signed-off-by: Brian Norris --- diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c index 69eaba690a99..253a644da76a 100644 --- a/drivers/mtd/nand/ndfc.c +++ b/drivers/mtd/nand/ndfc.c @@ -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);