Skip to content

Commit

Permalink
drivers/video/omap/hwa742.c: div reaches max_clk_div
Browse files Browse the repository at this point in the history
With for(div = 0; div < max_clk_div; div++) { ... } div reaches max_clk_div.

Signed-off-by: Roel Kluin <[email protected]>
Cc: Joe Perches <[email protected]>
Acked-by: Trilok Soni <[email protected]>
Cc: Russell King <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
RoelKluin authored and torvalds committed Apr 1, 2009
1 parent afbb9d8 commit ba78289
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/video/omap/hwa742.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit ba78289

Please sign in to comment.