aboutsummaryrefslogtreecommitdiff
path: root/COPYING
diff options
context:
space:
mode:
authorTomasz Figa <t.figa@samsung.com>2014-05-07 18:24:10 +0200
committerMark Brown <broonie@kernel.org>2014-12-08 18:57:55 +0000
commitd9a7c7c743772b1205de554aa92fe5e5afe49d58 (patch)
treed637a95859eb53c2c8e760650dd8627b1e5a8846 /COPYING
parent275e370c566136f758a016e02291978db0a87947 (diff)
clk: divider: Fix overflow in clk_divider_bestdivv3.14/topic/clk-divider
Commit c686078 ("clk: divider: Add round to closest divider") introduced a helper function to check whether given divisor is the best one instead of direct check. However due to int type used instead of unsigned long for passing calculated rates to this function in certain cases an overflow could occur, for example when trying to obtain maximum possible clock rate by calling clk_round_rate(..., UINT_MAX). This patch fixes this issue by changing the type of rate, now and best arguments of the function to unsigned long, which is the type that should be used for clock rates. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Acked-by: Maxime Coquelin <maxime.coquelin@st.com> Signed-off-by: Mike Turquette <mturquette@linaro.org> (cherry picked from commit 3c17296f28820d2a9fa23e549a1e808a4df5dfc6) Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions