]> git.baikalelectronics.ru Git - kernel.git/commit
clk: core: Potentially free connection id
authorMikko Perttunen <mperttunen@nvidia.com>
Wed, 11 Jul 2018 08:21:04 +0000 (11:21 +0300)
committerStephen Boyd <sboyd@kernel.org>
Wed, 25 Jul 2018 16:29:12 +0000 (09:29 -0700)
commit679f383888431c1dd6cc465757c5d5477b10c149
treeedfa2054bf9004cca73a8d39df895fdb32247ea4
parent0d5624e606504772b89d3c3d6b1be740ef176c61
clk: core: Potentially free connection id

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: a7abfbab0429 ("clk: core: Copy connection id")
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk.c