[PATCH] clk: Delete redundant logic.
From: jiping huang
Date: Mon Aug 26 2024 - 04:36:22 EST
In fact, the local variable "best_parent_rate" saved at the function
entrance is not used later on.
Signed-off-by: jiping huang <huangjiping95@xxxxxx>
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 8cca52be993f..d076939c42ab 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -2295,11 +2295,6 @@ static struct clk_core *clk_calc_new_rates(struct clk_core *core,
if (IS_ERR_OR_NULL(core))
return NULL;
- /* save parent rate, if it exists */
- parent = old_parent = core->parent;
- if (parent)
- best_parent_rate = parent->rate;
-
clk_core_get_boundaries(core, &min_rate, &max_rate);
/* find the closest rate and parent clk/rate */
--
2.34.1