[PATCH 1/2] clk: renesas: rzv2h: Drop duplicated parent lookup in fixed_mod_status_clk_register()

From: Ovidiu Panait

Date: Wed Sep 02 2026 - 06:57:47 EST


From: John Madieu <john.madieu.xa@xxxxxxxxxxxxxx>

rzv2h_cpg_fixed_mod_status_clk_register() looks up priv->clks[core->parent]
twice, with an IS_ERR() check after each lookup. The second lookup is a
leftover from an earlier refactor: the value cannot have changed between
the two reads, so the second IS_ERR() check is dead code.

Drop the duplicated lookup and check.

No functional change intended.

Signed-off-by: John Madieu <john.madieu.xa@xxxxxxxxxxxxxx>
Signed-off-by: Ovidiu Panait <ovidiu.panait.rb@xxxxxxxxxxx>
---
drivers/clk/renesas/rzv2h-cpg.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/drivers/clk/renesas/rzv2h-cpg.c b/drivers/clk/renesas/rzv2h-cpg.c
index 7003d59ac34b..86f6f2f700a6 100644
--- a/drivers/clk/renesas/rzv2h-cpg.c
+++ b/drivers/clk/renesas/rzv2h-cpg.c
@@ -923,9 +923,6 @@ rzv2h_cpg_fixed_mod_status_clk_register(const struct cpg_core_clk *core,
return ERR_CAST(parent);

parent_name = __clk_get_name(parent);
- parent = priv->clks[core->parent];
- if (IS_ERR(parent))
- return ERR_CAST(parent);

clk_hw_data = devm_kzalloc(priv->dev, sizeof(*clk_hw_data), GFP_KERNEL);
if (!clk_hw_data)
--
2.34.1