[PATCH 2/3] clk: rockchip: fix finding of maximum clock ID
Alexander Shiyan
eagle.alexander923 at gmail.com
Wed Apr 9 02:01:16 PDT 2025
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.
Signed-off-by: Alexander Shiyan <eagle.alexander923 at gmail.com>
---
drivers/clk/rockchip/clk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/rockchip/clk.c b/drivers/clk/rockchip/clk.c
index d5ecf3fc13..a154495efd 100644
--- a/drivers/clk/rockchip/clk.c
+++ b/drivers/clk/rockchip/clk.c
@@ -393,7 +393,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;
--
2.39.1
More information about the barebox
mailing list