Skip to content

Commit ad1081a

Browse files
ziyao233bebarino
authored andcommitted
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: 2dc66a5 ("clk: rockchip: rk3588: fix CLK_NR_CLKS usage") Signed-off-by: Yao Zi <ziyao@disroot.org> Link: https://lore.kernel.org/r/20240912133204.29089-2-ziyao@disroot.org Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent 9852d85 commit ad1081a

File tree

1 file changed

+1
-1
lines changed
  • drivers/clk/rockchip

1 file changed

+1
-1
lines changed

drivers/clk/rockchip/clk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ unsigned long rockchip_clk_find_max_clk_id(struct rockchip_clk_branch *list,
439439
if (list->id > max)
440440
max = list->id;
441441
if (list->child && list->child->id > max)
442-
max = list->id;
442+
max = list->child->id;
443443
}
444444

445445
return max;

0 commit comments

Comments
 (0)