Commit ad1081a0 authored by Yao Zi's avatar Yao Zi Committed by Stephen Boyd

clk: rockchip: fix finding of maximum clock ID

If an ID of a branch's child is greater than current maximum, we should
set new maximum to the child's ID, instead of its parent's.

Fixes: 2dc66a5a ("clk: rockchip: rk3588: fix CLK_NR_CLKS usage")
Signed-off-by: default avatarYao Zi <ziyao@disroot.org>
Link: https://lore.kernel.org/r/20240912133204.29089-2-ziyao@disroot.orgReviewed-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: default avatarHeiko Stuebner <heiko@sntech.de>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 9852d85e
......@@ -439,7 +439,7 @@ unsigned long rockchip_clk_find_max_clk_id(struct rockchip_clk_branch *list,
if (list->id > max)
max = list->id;
if (list->child && list->child->id > max)
max = list->id;
max = list->child->id;
}
return max;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment