diff options
| author | Sean Anderson <[email protected]> | 2022-01-15 17:24:58 -0500 |
|---|---|---|
| committer | Sean Anderson <[email protected]> | 2022-03-30 13:02:55 -0400 |
| commit | 276d446757e462c210768eb0bbd48450ae254f51 (patch) | |
| tree | a89503f0d871402173c7783cee3e59c8dac3f886 /drivers | |
| parent | d2e5250be49fce4653689c41a5dc7e2d7e7ecf33 (diff) | |
clk: Make rfree return void
When freeing a clock there is not much we can do if there is an error, and
most callers do not actually check the return value. Even e.g. checking to
make sure that clk->id is valid should have been done in request() in the
first place (unless someone is messing with the driver behind our back).
Just return void and don't bother returning an error.
Signed-off-by: Sean Anderson <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/clk/clk-uclass.c | 7 | ||||
| -rw-r--r-- | drivers/clk/clk_sandbox.c | 6 |
2 files changed, 6 insertions, 7 deletions
diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c index c20c928bf1d..2cc798e9368 100644 --- a/drivers/clk/clk-uclass.c +++ b/drivers/clk/clk-uclass.c @@ -481,10 +481,9 @@ int clk_free(struct clk *clk) return 0; ops = clk_dev_ops(clk->dev); - if (!ops->rfree) - return 0; - - return ops->rfree(clk); + if (ops->rfree) + ops->rfree(clk); + return 0; } ulong clk_get_rate(struct clk *clk) diff --git a/drivers/clk/clk_sandbox.c b/drivers/clk/clk_sandbox.c index 57acf7d8553..636914db8ca 100644 --- a/drivers/clk/clk_sandbox.c +++ b/drivers/clk/clk_sandbox.c @@ -101,15 +101,15 @@ static int sandbox_clk_request(struct clk *clk) return 0; } -static int sandbox_clk_free(struct clk *clk) +static void sandbox_clk_free(struct clk *clk) { struct sandbox_clk_priv *priv = dev_get_priv(clk->dev); if (clk->id >= SANDBOX_CLK_ID_COUNT) - return -EINVAL; + return; priv->requested[clk->id] = false; - return 0; + return; } static struct clk_ops sandbox_clk_ops = { |
