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 <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/r/20220115222504.617013-2-seanga2@gmail.com
diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
index c20c928..2cc798e 100644
--- a/drivers/clk/clk-uclass.c
+++ b/drivers/clk/clk-uclass.c
@@ -481,10 +481,9 @@
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)