diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2023-03-12 19:15:04 +0300 |
---|---|---|
committer | Bjorn Andersson <andersson@kernel.org> | 2023-03-13 15:41:06 +0300 |
commit | c4dc24da5286742f8cc728379f6115c9e886a8a4 (patch) | |
tree | 3afcaad9846340ef6111889d8d86e6658515de0d /drivers/clk/qcom/gcc-msm8960.c | |
parent | fe15c26ee26efa11741a7b632e9f23b01aca4cc6 (diff) | |
download | linux-c4dc24da5286742f8cc728379f6115c9e886a8a4.tar.xz |
clk: qcom: Convert to platform remove callback returning void
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 this driver 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>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230312161512.2715500-23-u.kleine-koenig@pengutronix.de
Diffstat (limited to 'drivers/clk/qcom/gcc-msm8960.c')
-rw-r--r-- | drivers/clk/qcom/gcc-msm8960.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/clk/qcom/gcc-msm8960.c b/drivers/clk/qcom/gcc-msm8960.c index 9dd4e7ffa1f8..dbc7093ab9cc 100644 --- a/drivers/clk/qcom/gcc-msm8960.c +++ b/drivers/clk/qcom/gcc-msm8960.c @@ -3754,19 +3754,17 @@ static int gcc_msm8960_probe(struct platform_device *pdev) return 0; } -static int gcc_msm8960_remove(struct platform_device *pdev) +static void gcc_msm8960_remove(struct platform_device *pdev) { struct platform_device *tsens = platform_get_drvdata(pdev); if (tsens) platform_device_unregister(tsens); - - return 0; } static struct platform_driver gcc_msm8960_driver = { .probe = gcc_msm8960_probe, - .remove = gcc_msm8960_remove, + .remove_new = gcc_msm8960_remove, .driver = { .name = "gcc-msm8960", .of_match_table = gcc_msm8960_match_table, |