summaryrefslogtreecommitdiff
path: root/drivers/clk/mediatek/clk-mt8186-apmixedsys.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2023-04-30 22:02:33 +0300
committerStephen Boyd <sboyd@kernel.org>2023-05-11 00:00:46 +0300
commita65615df5b458c7dcbbc3f6984a2063e77e445b3 (patch)
treeb8a68e8078ba66ed341966f83d5e89611d3b1a18 /drivers/clk/mediatek/clk-mt8186-apmixedsys.c
parentb3bc72757e63dbbb3abdb0ab8a4ccf3d9b081cce (diff)
downloadlinux-a65615df5b458c7dcbbc3f6984a2063e77e445b3.tar.xz
clk: mediatek: Convert all remaining drivers to platform_driver's .remove_new()
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert all mediatek clk drivers from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20230430190233.878921-4-u.kleine-koenig@pengutronix.de Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/mediatek/clk-mt8186-apmixedsys.c')
-rw-r--r--drivers/clk/mediatek/clk-mt8186-apmixedsys.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/clk/mediatek/clk-mt8186-apmixedsys.c b/drivers/clk/mediatek/clk-mt8186-apmixedsys.c
index da7950d51c64..fff64a8fd557 100644
--- a/drivers/clk/mediatek/clk-mt8186-apmixedsys.c
+++ b/drivers/clk/mediatek/clk-mt8186-apmixedsys.c
@@ -172,7 +172,7 @@ free_apmixed_data:
return r;
}
-static int clk_mt8186_apmixed_remove(struct platform_device *pdev)
+static void clk_mt8186_apmixed_remove(struct platform_device *pdev)
{
struct device_node *node = pdev->dev.of_node;
struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev);
@@ -181,13 +181,11 @@ static int clk_mt8186_apmixed_remove(struct platform_device *pdev)
mtk_clk_unregister_pllfhs(plls, ARRAY_SIZE(plls), pllfhs,
ARRAY_SIZE(pllfhs), clk_data);
mtk_free_clk_data(clk_data);
-
- return 0;
}
static struct platform_driver clk_mt8186_apmixed_drv = {
.probe = clk_mt8186_apmixed_probe,
- .remove = clk_mt8186_apmixed_remove,
+ .remove_new = clk_mt8186_apmixed_remove,
.driver = {
.name = "clk-mt8186-apmixed",
.of_match_table = of_match_clk_mt8186_apmixed,