mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
crypto: mxs-dcp - 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. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
e79de44e9d
commit
fdfe6c3248
@ -1131,7 +1131,7 @@ err_destroy_sha_thread:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int mxs_dcp_remove(struct platform_device *pdev)
|
||||
static void mxs_dcp_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct dcp *sdcp = platform_get_drvdata(pdev);
|
||||
|
||||
@ -1150,8 +1150,6 @@ static int mxs_dcp_remove(struct platform_device *pdev)
|
||||
platform_set_drvdata(pdev, NULL);
|
||||
|
||||
global_sdcp = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id mxs_dcp_dt_ids[] = {
|
||||
@ -1164,7 +1162,7 @@ MODULE_DEVICE_TABLE(of, mxs_dcp_dt_ids);
|
||||
|
||||
static struct platform_driver mxs_dcp_driver = {
|
||||
.probe = mxs_dcp_probe,
|
||||
.remove = mxs_dcp_remove,
|
||||
.remove_new = mxs_dcp_remove,
|
||||
.driver = {
|
||||
.name = "mxs-dcp",
|
||||
.of_match_table = mxs_dcp_dt_ids,
|
||||
|
Loading…
Reference in New Issue
Block a user