Skip to content

Commit a32e88f

Browse files
tititiou36bebarino
authored andcommitted
clk: mediatek: mt7622-apmixedsys: Fix an error handling path in clk_mt8135_apmixed_probe()
'clk_data' is allocated with mtk_devm_alloc_clk_data(). So calling mtk_free_clk_data() explicitly in the remove function would lead to a double-free. Remove the redundant call. Fixes: c50e2ea ("clk: mediatek: mt7622-apmixedsys: Add .remove() callback for module build") Signed-off-by: Christophe JAILLET <[email protected]> Link: https://lore.kernel.org/r/2c553c2a5077757e4f7af0bb895acc43881cf62c.1704616152.git.christophe.jaillet@wanadoo.fr Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
1 parent 03c1c51 commit a32e88f

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/clk/mediatek/clk-mt7622-apmixedsys.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ static void clk_mt7622_apmixed_remove(struct platform_device *pdev)
127127
of_clk_del_provider(node);
128128
mtk_clk_unregister_gates(apmixed_clks, ARRAY_SIZE(apmixed_clks), clk_data);
129129
mtk_clk_unregister_plls(plls, ARRAY_SIZE(plls), clk_data);
130-
mtk_free_clk_data(clk_data);
131130
}
132131

133132
static const struct of_device_id of_match_clk_mt7622_apmixed[] = {

0 commit comments

Comments
 (0)