diff options
author | Jingoo Han <jg1.han@samsung.com> | 2012-06-10 22:27:27 -0400 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2012-06-13 13:34:16 -0400 |
commit | b67989515defba7412acff01162e5bb1f0f5923a (patch) | |
tree | 36ea005ffda0daa38b92846536c4087fa9c21753 /drivers/video/s3c-fb.c | |
parent | ecd57ae28eb34e2b34fac1c5b74bb876efa665c0 (diff) |
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>
Diffstat (limited to 'drivers/video/s3c-fb.c')
-rw-r--r-- | drivers/video/s3c-fb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c index b5c29399a5ee..ea7b661e7229 100644 --- a/drivers/video/s3c-fb.c +++ b/drivers/video/s3c-fb.c | |||
@@ -361,7 +361,7 @@ static int s3c_fb_calc_pixclk(struct s3c_fb *sfb, unsigned int pixclk) | |||
361 | result = (unsigned int)tmp / 1000; | 361 | result = (unsigned int)tmp / 1000; |
362 | 362 | ||
363 | dev_dbg(sfb->dev, "pixclk=%u, clk=%lu, div=%d (%lu)\n", | 363 | dev_dbg(sfb->dev, "pixclk=%u, clk=%lu, div=%d (%lu)\n", |
364 | pixclk, clk, result, clk / result); | 364 | pixclk, clk, result, result ? clk / result : clk); |
365 | 365 | ||
366 | return result; | 366 | return result; |
367 | } | 367 | } |