All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]  mtd/nand: max_retries off by one
@ 2009-06-04 14:24 Roel Kluin
  0 siblings, 0 replies; only message in thread
From: Roel Kluin @ 2009-06-04 14:24 UTC (permalink / raw)
  To: dwmw2; +Cc: Andrew Morton, linux-mtd

with `while (max_retries-- > 0)' max_retries reaches -1 after the loop.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index 40c2608..b9706ad 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -192,7 +192,7 @@ static void wait_op_done(struct mxc_nand_host *host, int max_retries,
 			}
 			udelay(1);
 		}
-		if (max_retries <= 0)
+		if (max_retries < 0)
 			DEBUG(MTD_DEBUG_LEVEL0, "%s(%d): INT not set\n",
 			      __func__, param);
 	}

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-04 12:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-04 14:24 [PATCH] mtd/nand: max_retries off by one Roel Kluin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.