@@ -1828,7 +1828,8 @@ EXPORT_SYMBOL_GPL(clk_provider_get_parent);
* clk_get_parent - return the parent of a clk
* @clk_user: the clk whose parent gets returned
*
- * Simply returns clk->parent. Returns NULL if clk is NULL.
+ * Simply returns clk->parent. Returns NULL if clk is NULL. Caller must call
+ * clk_put() to release the returned struct clk.
*/
struct clk *clk_get_parent(struct clk *clk_user)
{
@@ -306,7 +306,8 @@ int clk_set_parent(struct clk *clk, struct clk *parent);
* @clk: clock source
*
* Returns struct clk corresponding to parent clock source, or
- * valid IS_ERR() condition containing errno.
+ * valid IS_ERR() condition containing errno. Caller must call
+ * clk_put() to release the returned struct clk.
*/
struct clk *clk_get_parent(struct clk *clk);
As otherwise the per-user clk will be leaked. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> --- drivers/clk/clk.c | 3 ++- include/linux/clk.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)