summaryrefslogtreecommitdiff
path: root/drivers/edac/fsl_ddr_edac.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2023-10-13 13:04:23 +0300
committerBorislav Petkov (AMD) <bp@alien8.de>2023-11-21 01:34:04 +0300
commit0c7c7ba0c7215de44410e9c4acce28d762dd907a (patch)
tree2785dea9f3ff8dc09644e7893343d3b252f2c16d /drivers/edac/fsl_ddr_edac.c
parentec886cf8813bbfd4dd3f7aba3f660edd5f0a69d8 (diff)
downloadlinux-0c7c7ba0c7215de44410e9c4acce28d762dd907a.tar.xz
EDAC/fsl_ddr: 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(). fsl_mc_err_remove() is used as callback in two drivers. So these have to be converted together to the void returning remove callback. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20231013100422.1382040-2-u.kleine-koenig@pengutronix.de
Diffstat (limited to 'drivers/edac/fsl_ddr_edac.c')
-rw-r--r--drivers/edac/fsl_ddr_edac.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/edac/fsl_ddr_edac.c b/drivers/edac/fsl_ddr_edac.c
index b81757555a8a..d148d262d0d4 100644
--- a/drivers/edac/fsl_ddr_edac.c
+++ b/drivers/edac/fsl_ddr_edac.c
@@ -612,7 +612,7 @@ err:
return res;
}
-int fsl_mc_err_remove(struct platform_device *op)
+void fsl_mc_err_remove(struct platform_device *op)
{
struct mem_ctl_info *mci = dev_get_drvdata(&op->dev);
struct fsl_mc_pdata *pdata = mci->pvt_info;
@@ -629,5 +629,4 @@ int fsl_mc_err_remove(struct platform_device *op)
edac_mc_del_mc(&op->dev);
edac_mc_free(mci);
- return 0;
}