Skip to content

Commit

Permalink
[PATCH] imsttfb: Remove dead code
Browse files Browse the repository at this point in the history
clk_p is always 0.

Coverity Bug 67

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Antonino A. Daplas authored and Linus Torvalds committed Mar 27, 2006
1 parent eba87e8 commit 6257ffa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/video/imsttfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,9 +440,9 @@ getclkMHz(struct imstt_par *par)
static void
setclkMHz(struct imstt_par *par, __u32 MHz)
{
__u32 clk_m, clk_n, clk_p, x, stage, spilled;
__u32 clk_m, clk_n, x, stage, spilled;

clk_m = clk_n = clk_p = 0;
clk_m = clk_n = 0;
stage = spilled = 0;
for (;;) {
switch (stage) {
Expand All @@ -453,7 +453,7 @@ setclkMHz(struct imstt_par *par, __u32 MHz)
clk_n++;
break;
}
x = 20 * (clk_m + 1) / ((clk_n + 1) * (clk_p ? 2 * clk_p : 1));
x = 20 * (clk_m + 1) / (clk_n + 1);
if (x == MHz)
break;
if (x > MHz) {
Expand All @@ -466,7 +466,7 @@ setclkMHz(struct imstt_par *par, __u32 MHz)

par->init.pclk_m = clk_m;
par->init.pclk_n = clk_n;
par->init.pclk_p = clk_p;
par->init.pclk_p = 0;
}

static struct imstt_regvals *
Expand Down

0 comments on commit 6257ffa

Please sign in to comment.