diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2023-10-15 15:59:56 +0200 |
---|---|---|
committer | Georgi Djakov <djakov@kernel.org> | 2023-10-18 13:37:39 +0300 |
commit | c8fd5a37340f9dfb02f7c340d7b602bd2f7ec449 (patch) | |
tree | c3cf8ea3f89a1be74255208a471dd0ee7726235e /drivers/interconnect/qcom/sc7180.c | |
parent | 3642b4e5cbfe480892858f0209c6fd0a3172a103 (diff) |
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/sc7180.c')
-rw-r--r-- | drivers/interconnect/qcom/sc7180.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/interconnect/qcom/sc7180.c b/drivers/interconnect/qcom/sc7180.c index d94ab9b39f3d..3f1a0f358e0d 100644 --- a/drivers/interconnect/qcom/sc7180.c +++ b/drivers/interconnect/qcom/sc7180.c @@ -1806,7 +1806,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-sc7180", .of_match_table = qnoc_of_match, |