drivers/video/omap/hwa742.c: div reaches max_clk_div
authorRoel Kluin <roel.kluin@gmail.com>
Tue, 31 Mar 2009 22:25:32 +0000 (15:25 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 1 Apr 2009 15:59:32 +0000 (08:59 -0700)
With for(div = 0; div < max_clk_div; div++) { ... } div reaches max_clk_div.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Joe Perches <joe@perches.com>
Acked-by: Trilok Soni <soni.trilok@gmail.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/omap/hwa742.c

index f24df0b54e1cad0ff54ab68d5439b99fd8ae03c0..8aa6e47202b943369cb23912b0f8c66ed613877a 100644 (file)
@@ -742,7 +742,7 @@ static int calc_extif_timings(unsigned long sysclk, int *extif_mem_div)
                if (calc_reg_timing(sysclk, div) == 0)
                        break;
        }
-       if (div > max_clk_div)
+       if (div >= max_clk_div)
                goto err;
 
        *extif_mem_div = div;
@@ -752,7 +752,7 @@ static int calc_extif_timings(unsigned long sysclk, int *extif_mem_div)
                        break;
        }
 
-       if (div > max_clk_div)
+       if (div >= max_clk_div)
                goto err;
 
        return 0;