dect
/
linux-2.6
Archived
13
0
Fork 0

video: s3c-fb: fix possible division by zero in s3c_fb_calc_pixclk

Divider value can be zero and it makes division by zero
from debug message in s3c_fb_calc_pixclk; therefore, it
should be fixed.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
This commit is contained in:
Jingoo Han 2012-06-11 11:27:27 +09:00 committed by Florian Tobias Schandinat
parent ecd57ae28e
commit b67989515d
1 changed files with 1 additions and 1 deletions

View File

@ -361,7 +361,7 @@ static int s3c_fb_calc_pixclk(struct s3c_fb *sfb, unsigned int pixclk)
result = (unsigned int)tmp / 1000;
dev_dbg(sfb->dev, "pixclk=%u, clk=%lu, div=%d (%lu)\n",
pixclk, clk, result, clk / result);
pixclk, clk, result, result ? clk / result : clk);
return result;
}