[PATCH] clk: fix clk_get_rate() documentation

Giulio Benetti giulio.benetti at benettiengineering.com
Wed Feb 10 18:37:22 CET 2021


clk_get_rate() can't and doesn't return -ve on error, it actually returns 0
on error or a value greater than 0 on success. So let's fix its
documentation.

Signed-off-by: Giulio Benetti <giulio.benetti at benettiengineering.com>
---
 include/clk.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/clk.h b/include/clk.h
index ca6b85fa6f..a833d6a27b 100644
--- a/include/clk.h
+++ b/include/clk.h
@@ -344,7 +344,7 @@ int clk_free(struct clk *clk);
  *
  * @clk:	A clock struct that was previously successfully requested by
  *		clk_request/get_by_*().
- * @return clock rate in Hz, or -ve error code.
+ * @return clock rate in Hz on success, or 0 on error.
  */
 ulong clk_get_rate(struct clk *clk);
 
-- 
2.25.1



More information about the U-Boot mailing list