]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
clk: pistachio: Fix 32bit integer overflows
authorZdenko Pulitika <zdenko.pulitika@imgtec.com>
Wed, 26 Aug 2015 16:11:37 +0000 (17:11 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Sep 2015 17:10:47 +0000 (10:10 -0700)
commitf96b6fdea5a2ef6a4ceba96463904e320fae88a3
tree8a4bac41f8b48de11f55acca4d0700152de28875
parentcd26539f1233da20113eaab88a1b18775ed6dd04
clk: pistachio: Fix 32bit integer overflows

commit 093affb009a3d87848e51217cd1a06ce1135633f upstream.

This commit fixes 32bit integer overflows throughout the pll driver
(i.e. wherever the result of integer multiplication may exceed the
range of u32).

One of the functions affected by this problem is .recalc_rate. It
returns incorrect rate for some pll settings (not for all though)
which in turn results in the incorrect rate setup of pll's child
clocks.

Fixes: 43049b0c83f17("CLK: Pistachio: Add PLL driver")
Reviewed-by: Andrew Bresticker <abrestic@chromium.org>
Signed-off-by: Zdenko Pulitika <zdenko.pulitika@imgtec.com>
Signed-off-by: Govindraj Raja <govindraj.raja@imgtec.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/clk/pistachio/clk-pll.c
drivers/clk/pistachio/clk.h