Commit c319572a authored by Tero Kristo's avatar Tero Kristo Committed by Lokesh Vutla
Browse files

clk: sci-clk: fix return value of set_rate

Set rate should return the new clock rate on success, and negative error
value on failure. Fix this, as currently set_rate returns 0 on success.
Signed-off-by: default avatarTero Kristo <>
Signed-off-by: default avatarTero Kristo <>
parent 7ab418fb
......@@ -111,10 +111,12 @@ static ulong ti_sci_clk_set_rate(struct clk *clk, ulong rate)
ret = cops->set_freq(sci, clk->id, clk->data, 0, rate, ULONG_MAX);
if (ret)
if (ret) {
dev_err(clk->dev, "%s: set_freq failed (%d)\n", __func__, ret);
return ret;
return ret;
return rate;
static int ti_sci_clk_set_parent(struct clk *clk, struct clk *parent)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment