lkml.org 
[lkml]   [2018]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] clk: core: Potentially free connection id
Date
On Wed, 2018-07-11 at 11:21 +0300, Mikko Perttunen wrote:
> Patch "clk: core: Copy connection id" made it so that the connector
> id (con_id) is kstrdup_const'ed to cater to drivers that pass non-
> constant connection ids. The patch added the corresponding
> kfree_const
> to __clk_free_clk, but struct clk's can be freed also via __clk_put.
> Add the kfree_const call to __clk_put and add comments to both
> functions to remind that the logic in them should be kept in sync.
>
> Fixes: 253160a8ad06 ("clk: core: Copy connection id")
> Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>

Yes, sorry I missed this.

Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>

Maybe a static __clk_free_mem function could be created instead of
comments asking to keep things in sync? But there are only 2 lines so
it's fine.
\
 
 \ /
  Last update: 2018-07-11 12:17    [W:0.022 / U:3.708 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site