summaryrefslogtreecommitdiffstats
path: root/drivers/interconnect/qcom/sm6350.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2023-10-15 15:59:56 +0200
committerGeorgi Djakov <djakov@kernel.org>2023-10-18 12:37:39 +0200
commitc8fd5a37340f9dfb02f7c340d7b602bd2f7ec449 (patch)
treec3cf8ea3f89a1be74255208a471dd0ee7726235e /drivers/interconnect/qcom/sm6350.c
parentinterconnect: qcom: Add SDX75 interconnect provider driver (diff)
downloadlinux-c8fd5a37340f9dfb02f7c340d7b602bd2f7ec449.tar.xz
linux-c8fd5a37340f9dfb02f7c340d7b602bd2f7ec449.zip
interconnect: 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 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 drivers use qcom_icc_rpmh_remove() as remove callback which returns zero unconditionally. Make it return void and use .remove_new in the drivers. There is no change in behaviour. 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/20231015135955.1537751-2-u.kleine-koenig@pengutronix.de Signed-off-by: Georgi Djakov <djakov@kernel.org>
Diffstat (limited to 'drivers/interconnect/qcom/sm6350.c')
-rw-r--r--drivers/interconnect/qcom/sm6350.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/interconnect/qcom/sm6350.c b/drivers/interconnect/qcom/sm6350.c
index 49aed492e9b8..f1907cb9891f 100644
--- a/drivers/interconnect/qcom/sm6350.c
+++ b/drivers/interconnect/qcom/sm6350.c
@@ -1701,7 +1701,7 @@ MODULE_DEVICE_TABLE(of, qnoc_of_match);
static struct platform_driver qnoc_driver = {
.probe = qcom_icc_rpmh_probe,
- .remove = qcom_icc_rpmh_remove,
+ .remove_new = qcom_icc_rpmh_remove,
.driver = {
.name = "qnoc-sm6350",
.of_match_table = qnoc_of_match,