clk: mediatek: Unregister clks in mtk_clk_simple_probe() error path
authorChen-Yu Tsai <wenst@chromium.org>
Tue, 8 Feb 2022 12:40:30 +0000 (20:40 +0800)
committerStephen Boyd <sboyd@kernel.org>
Thu, 17 Feb 2022 20:12:24 +0000 (12:12 -0800)
commit2d18b7e31aa804dc6c0e43545ae5b028802e6f86
tree170f43fb046528ee23eb4995a4ebb761c62b1986
parent3c3ba2ab0226f9a4f4312a5db2dd402ec42392ca
clk: mediatek: Unregister clks in mtk_clk_simple_probe() error path

Until now the mediatek clk driver library did not have any way to
unregister clks, and so all drivers did not do proper cleanup in
their error paths.

Now that the library does have APIs to unregister clks, use them
in the error path of mtk_clk_simple_probe() to do proper cleanup.

Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: Miles Chen <miles.chen@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220208124034.414635-28-wenst@chromium.org
Reviewed-by: Chun-Jie Chen <chun-jie.chen@mediatek.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/mediatek/clk-mtk.c