mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] clk: clk_set_parent: skip any operation if current and new parents are equal
@ 2025-10-03 10:37 Michael Grzeschik
  2025-10-06 11:43 ` Ahmad Fatoum
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Grzeschik @ 2025-10-03 10:37 UTC (permalink / raw)
  To: barebox

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
 drivers/clk/clk.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 89a007a12c5..ac5b83cf8b4 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -302,6 +302,9 @@ int clk_set_parent(struct clk *clk, struct clk *newparent)
 	if (IS_ERR(newparent))
 		return PTR_ERR(newparent);
 
+	if (newparent == curparent)
+		return 0;
+
 	if (!clk->num_parents)
 		return -EINVAL;
 	if (!clk->ops->set_parent)
-- 
2.47.3




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-10-07 11:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-03 10:37 [PATCH] clk: clk_set_parent: skip any operation if current and new parents are equal Michael Grzeschik
2025-10-06 11:43 ` Ahmad Fatoum
2025-10-06 20:53   ` Michael Grzeschik
2025-10-07 11:50     ` Sascha Hauer
2025-10-07 11:57       ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox