]> git.baikalelectronics.ru Git - kernel.git/commit
clk: mediatek: fix unregister function in mtk_clk_register_dividers cleanup
authorChen-Yu Tsai <wenst@chromium.org>
Mon, 26 Sep 2022 10:25:18 +0000 (18:25 +0800)
committerChen-Yu Tsai <wenst@chromium.org>
Thu, 29 Sep 2022 04:27:24 +0000 (12:27 +0800)
commit2f590eeb2086ae3221edb8d64b6476576356be39
tree432a60a9483efc7ae2a32d824b853f2f0e12a0a3
parentaed2f524a2bd388ced88c4f1b7db859153aa07f3
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: 088b81b41663 ("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>
drivers/clk/mediatek/clk-mtk.c