summaryrefslogtreecommitdiffstats
path: root/drivers/soc/ixp4xx
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2023-09-25 11:55:02 +0200
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>2023-10-14 23:27:13 +0200
commit48544eee87a5df20f469fbcd44776235db3bb0b8 (patch)
tree7e60fb5571d9e4980637a82b39f795e43444adf7 /drivers/soc/ixp4xx
parentsoc/ixp4xx: ixp4xx-npe: Convert to platform remove callback returning void (diff)
downloadlinux-48544eee87a5df20f469fbcd44776235db3bb0b8.tar.xz
linux-48544eee87a5df20f469fbcd44776235db3bb0b8.zip
soc/ixp4xx: ixp4xx-qmgr: 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(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Link: https://lore.kernel.org/r/20230925095532.1984344-12-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'drivers/soc/ixp4xx')
-rw-r--r--drivers/soc/ixp4xx/ixp4xx-qmgr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/soc/ixp4xx/ixp4xx-qmgr.c b/drivers/soc/ixp4xx/ixp4xx-qmgr.c
index 291086bb9313..244ad8d7e80b 100644
--- a/drivers/soc/ixp4xx/ixp4xx-qmgr.c
+++ b/drivers/soc/ixp4xx/ixp4xx-qmgr.c
@@ -442,11 +442,10 @@ static int ixp4xx_qmgr_probe(struct platform_device *pdev)
return 0;
}
-static int ixp4xx_qmgr_remove(struct platform_device *pdev)
+static void ixp4xx_qmgr_remove(struct platform_device *pdev)
{
synchronize_irq(qmgr_irq_1);
synchronize_irq(qmgr_irq_2);
- return 0;
}
static const struct of_device_id ixp4xx_qmgr_of_match[] = {
@@ -462,7 +461,7 @@ static struct platform_driver ixp4xx_qmgr_driver = {
.of_match_table = ixp4xx_qmgr_of_match,
},
.probe = ixp4xx_qmgr_probe,
- .remove = ixp4xx_qmgr_remove,
+ .remove_new = ixp4xx_qmgr_remove,
};
module_platform_driver(ixp4xx_qmgr_driver);