summaryrefslogtreecommitdiff
path: root/drivers/media/radio
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2023-03-26 16:32:06 +0200
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2023-04-11 16:59:20 +0200
commit830d1151f91885aad30826b1968a376906f28a8a (patch)
tree2685a41e91a8ec3752f4bb614a4c39dd70604fd0 /drivers/media/radio
parentdbb836e239687d1b3db2d7b65ae207c1249f98a5 (diff)
media: radio-si476x: 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 (mostly) ignored 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. 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: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/radio')
-rw-r--r--drivers/media/radio/radio-si476x.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/radio/radio-si476x.c b/drivers/media/radio/radio-si476x.c
index 171f9cc9ee5e..6061506159f1 100644
--- a/drivers/media/radio/radio-si476x.c
+++ b/drivers/media/radio/radio-si476x.c
@@ -1498,7 +1498,7 @@ exit:
return rval;
}
-static int si476x_radio_remove(struct platform_device *pdev)
+static void si476x_radio_remove(struct platform_device *pdev)
{
struct si476x_radio *radio = platform_get_drvdata(pdev);
@@ -1506,8 +1506,6 @@ static int si476x_radio_remove(struct platform_device *pdev)
video_unregister_device(&radio->videodev);
v4l2_device_unregister(&radio->v4l2dev);
debugfs_remove_recursive(radio->debugfs);
-
- return 0;
}
MODULE_ALIAS("platform:si476x-radio");
@@ -1517,7 +1515,7 @@ static struct platform_driver si476x_radio_driver = {
.name = DRIVER_NAME,
},
.probe = si476x_radio_probe,
- .remove = si476x_radio_remove,
+ .remove_new = si476x_radio_remove,
};
module_platform_driver(si476x_radio_driver);