summaryrefslogtreecommitdiff
path: root/drivers/clk/mediatek
diff options
context:
space:
mode:
authorChen-Yu Tsai <wenst@chromium.org>2022-09-26 13:25:18 +0300
committerChen-Yu Tsai <wenst@chromium.org>2022-09-29 07:27:24 +0300
commit20f7a0dba9075fb0e3d645495bc24d7025b58de1 (patch)
tree432a60a9483efc7ae2a32d824b853f2f0e12a0a3 /drivers/clk/mediatek
parent116151bd95d5050581c8f77be7fe91f0cedfb32a (diff)
downloadlinux-20f7a0dba9075fb0e3d645495bc24d7025b58de1.tar.xz
clk: mediatek: fix unregister function in mtk_clk_register_dividers cleanup
When the cleanup paths for the various clk register APIs in the MediaTek clk library were added, the one in the dividers type used the wrong type of unregister function. This would result in incorrect dereferencing of the clk pointer and freeing of invalid pointers. Fix this by switching to the correct type of clk unregistration call. Fixes: 3c3ba2ab0226 ("clk: mediatek: mtk: Implement error handling in register APIs") Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220926102523.2367530-2-wenst@chromium.org Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Diffstat (limited to 'drivers/clk/mediatek')
-rw-r--r--drivers/clk/mediatek/clk-mtk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c
index 3a8875b6c37f..174d0645be38 100644
--- a/drivers/clk/mediatek/clk-mtk.c
+++ b/drivers/clk/mediatek/clk-mtk.c
@@ -393,7 +393,7 @@ err:
if (IS_ERR_OR_NULL(clk_data->hws[mcd->id]))
continue;
- mtk_clk_unregister_composite(clk_data->hws[mcd->id]);
+ clk_hw_unregister_divider(clk_data->hws[mcd->id]);
clk_data->hws[mcd->id] = ERR_PTR(-ENOENT);
}