Skip to content
Snippets Groups Projects
Commit 832685f0 authored by Fabien Parent's avatar Fabien Parent Committed by Lukasz Majewski
Browse files

clk: mediatek: use unsigned type for returning the clk rate


mtk_clk_find_parent_rate is calling clk_get_rate to know the rate
of a parent clock. clk_get_rate returns a ulong, while
mtk_clk_find_parent_rate returns an int. This implicit cast creates
an issue for clock rates big enough to need the full 32 bits to
store its data. When that happen the clk rate will become incorrect
because of the implicit cast between ulong -> int -> ulong.

This commit change the return type of mtk_clk_find_parent_rate to
ulong.

Signed-off-by: default avatarFabien Parent <fparent@baylibre.com>
parent 40521a6c
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment