summaryrefslogtreecommitdiffstats
path: root/drivers/interconnect/qcom/msm8996.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2023-10-31 23:28:53 +0100
committerGeorgi Djakov <djakov@kernel.org>2023-11-22 14:57:07 +0100
commit772f88907d92484232f60c51c5c5e792a86d37ac (patch)
treeae5ab48d4e9b330a339a96e9356ac59a9a06554b /drivers/interconnect/qcom/msm8996.c
parentLinux 6.7-rc1 (diff)
downloadlinux-772f88907d92484232f60c51c5c5e792a86d37ac.tar.xz
linux-772f88907d92484232f60c51c5c5e792a86d37ac.zip
interconnect: qcom: Make qnoc_remove return 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 ignored (apart from emitting a warning) 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. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Several interconnect/qcom drivers use qnoc_remove() as remove callback. Make this function return void (instead of unconditionally zero) and adapt the drivers using this function accordingly. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Link: https://lore.kernel.org/r/20231031222851.3126434-12-u.kleine-koenig@pengutronix.de Signed-off-by: Georgi Djakov <djakov@kernel.org>
Diffstat (limited to 'drivers/interconnect/qcom/msm8996.c')
-rw-r--r--drivers/interconnect/qcom/msm8996.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/interconnect/qcom/msm8996.c b/drivers/interconnect/qcom/msm8996.c
index b73566c9b21f..788131400cd1 100644
--- a/drivers/interconnect/qcom/msm8996.c
+++ b/drivers/interconnect/qcom/msm8996.c
@@ -2108,7 +2108,7 @@ MODULE_DEVICE_TABLE(of, qnoc_of_match);
static struct platform_driver qnoc_driver = {
.probe = qnoc_probe,
- .remove = qnoc_remove,
+ .remove_new = qnoc_remove,
.driver = {
.name = "qnoc-msm8996",
.of_match_table = qnoc_of_match,