]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
mtd: nand: max_retries off by one in mxc_nand
authorRoel Kluin <roel.kluin@gmail.com>
Thu, 4 Jun 2009 14:24:59 +0000 (16:24 +0200)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 5 Jun 2009 20:33:14 +0000 (21:33 +0100)
with `while (max_retries-- > 0)' max_retries reaches -1 after the loop.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/nand/mxc_nand.c

index d03bd4eff72292fd6c20b1769dd2bdda439f431e..da41ea82941a61172eaff10fcef035834cb83527 100644 (file)
@@ -199,7 +199,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);
        }