diff options
| author | Chris Brand <chris.brand@linaro.org> | 2014-07-03 17:01:29 -0400 |
|---|---|---|
| committer | Mike Turquette <mturquette@linaro.org> | 2014-07-29 20:13:48 -0400 |
| commit | abeab450bfe823079c8a3abf5123f41a0da62392 (patch) | |
| tree | 2fb18391c00a408ba059781b5ab3c1e537640536 | |
| parent | d14c17b235abb7c76150db2efe673fd9d4561fb1 (diff) | |
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: Chris Brand <chris.brand@linaro.org>
Reviewed-by: Matt Porter <mporter@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
| -rw-r--r-- | drivers/clk/clk.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index f95590a1e28e..b76fa69b44cb 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c | |||
| @@ -284,9 +284,11 @@ static int clk_debug_create_one(struct clk *clk, struct dentry *pdentry) | |||
| 284 | if (!d) | 284 | if (!d) |
| 285 | goto err_out; | 285 | goto err_out; |
| 286 | 286 | ||
| 287 | if (clk->ops->debug_init) | 287 | if (clk->ops->debug_init) { |
| 288 | if (clk->ops->debug_init(clk->hw, clk->dentry)) | 288 | ret = clk->ops->debug_init(clk->hw, clk->dentry); |
| 289 | if (ret) | ||
| 289 | goto err_out; | 290 | goto err_out; |
| 291 | } | ||
| 290 | 292 | ||
| 291 | ret = 0; | 293 | ret = 0; |
| 292 | goto out; | 294 | goto out; |
