提交 abeab450 编写于 作者: C Chris Brand 提交者: Mike Turquette

clk: Propagate any error return from debug_init()

If the .debug_init op is provided, it will be called by
clk_debug_create_one(). If debug_init() returns an error code,
clk_debug_create_one() will return -ENOMEM, regardless of the
value returned from debug_init(). Tweak the code to return
the actual value returned by debug_init() instead.
Signed-off-by: NChris Brand <chris.brand@linaro.org>
Reviewed-by: NMatt Porter <mporter@linaro.org>
Reviewed-by: NAlex Elder <elder@linaro.org>
Signed-off-by: NMike Turquette <mturquette@linaro.org>
上级 d14c17b2
......@@ -284,9 +284,11 @@ static int clk_debug_create_one(struct clk *clk, struct dentry *pdentry)
if (!d)
goto err_out;
if (clk->ops->debug_init)
if (clk->ops->debug_init(clk->hw, clk->dentry))
if (clk->ops->debug_init) {
ret = clk->ops->debug_init(clk->hw, clk->dentry);
if (ret)
goto err_out;
}
ret = 0;
goto out;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册