]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/clk/clk.c
clk: core: Potentially free connection id
authorMikko Perttunen <mperttunen@nvidia.com>
Wed, 11 Jul 2018 08:21:04 +0000 (11:21 +0300)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:48:28 +0000 (19:48 -0600)
commitc3beae995244d5faef880b6afb1150cc264dab98
treee340230f461433d3a4b7066040f6944c1db3cd3f
parent33c521806e8dbe5adb3a33005ec5956bd025bab4
clk: core: Potentially free connection id

BugLink: https://bugs.launchpad.net/bugs/1836117
[ Upstream commit 365f7a89c881e84f1ebc925f65f899d5d7ce547e ]

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>
Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/clk/clk.c