diff mbox

[2/2] clk: clk-conf: Convert to use clk_set_rate_safe()

Message ID 1524907018-195819-2-git-send-email-shawn.lin@rock-chips.com (mailing list archive)
State Changes Requested, archived
Headers show

Commit Message

Shawn Lin April 28, 2018, 9:16 a.m. UTC
If assigning clock rate from firmware, make sure any assignment
is safety for the its children.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---

 drivers/clk/clk-conf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/clk/clk-conf.c b/drivers/clk/clk-conf.c
index 49819b5..2dd0305 100644
--- a/drivers/clk/clk-conf.c
+++ b/drivers/clk/clk-conf.c
@@ -107,7 +107,7 @@  static int __set_clk_rates(struct device_node *node, bool clk_supplier)
 				return PTR_ERR(clk);
 			}
 
-			rc = clk_set_rate(clk, rate);
+			rc = clk_set_rate_safe(clk, rate);
 			if (rc < 0)
 				pr_err("clk: couldn't set %s clk rate to %u (%d), current rate: %lu\n",
 				       __clk_get_name(clk), rate, rc,