projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
584ca02
)
[media] omap3isp: Fix division by 0
author
Laurent Pinchart
<
[email protected]
>
Thu, 25 Sep 2014 12:22:00 +0000
(09:22 -0300)
committer
Mauro Carvalho Chehab
<
[email protected]
>
Tue, 23 Dec 2014 10:43:54 +0000
(08:43 -0200)
If the requested clock rate passed to the XCLK set_rate or round_rate
operation is 0, the driver will try to divide by 0. Fix this.
Signed-off-by: Laurent Pinchart <
[email protected]
>
Acked-by: Sakari Ailus <
[email protected]
>
Signed-off-by: Mauro Carvalho Chehab <
[email protected]
>
drivers/media/platform/omap3isp/isp.c
patch
|
blob
|
history
diff --git
a/drivers/media/platform/omap3isp/isp.c
b/drivers/media/platform/omap3isp/isp.c
index 51c2129bdcc64e45e1467c2c2f0f533ebe70f113..deca80903c3a08fd59e875b110d4cb0fa3b5189f 100644
(file)
--- a/
drivers/media/platform/omap3isp/isp.c
+++ b/
drivers/media/platform/omap3isp/isp.c
@@
-220,6
+220,9
@@
static u32 isp_xclk_calc_divider(unsigned long *rate, unsigned long parent_rate)
return ISPTCTRL_CTRL_DIV_BYPASS;
}
+ if (*rate == 0)
+ *rate = 1;
+
divider = DIV_ROUND_CLOSEST(parent_rate, *rate);
if (divider >= ISPTCTRL_CTRL_DIV_BYPASS)
divider = ISPTCTRL_CTRL_DIV_BYPASS - 1;