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-Url: https://git.stricted.de/?a=commitdiff_plain;h=2a7295b277539728a748fba00db388f3dc49c0d0;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.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;