From: Andrew Morton Date: Sun, 18 Feb 2007 00:02:11 +0000 (-0800) Subject: [MTD] [NAND] Work around false compiler warning in CAFÉ driver X-Git-Tag: v2.6.21-rc1~66^2~1 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=2a7295b277539728a748fba00db388f3dc49c0d0;p=linux-2.6-omap-h63xx.git [MTD] [NAND] Work around false compiler warning in CAFÉ driver drivers/mtd/nand/cafe.c: In function 'cafe_nand_cmdfunc': drivers/mtd/nand/cafe.c:269: warning: 'irqs' may be used uninitialized in this function Signed-off-by: Andrew Morton Signed-off-by: David Woodhouse --- diff --git a/drivers/mtd/nand/cafe.c b/drivers/mtd/nand/cafe.c index 1e877cbe775..5ec82beb49d 100644 --- a/drivers/mtd/nand/cafe.c +++ b/drivers/mtd/nand/cafe.c @@ -265,10 +265,10 @@ static void cafe_nand_cmdfunc(struct mtd_info *mtd, unsigned command, ndelay(100); if (1) { - int c = 500000; + int c; uint32_t irqs; - while (c--) { + for (c = 500000; c != 0; c--) { irqs = cafe_readl(cafe, NAND_IRQ); if (irqs & doneint) break;