summaryrefslogtreecommitdiffstats
path: root/sound/soc/bcm
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2023-03-15 16:05:30 +0100
committerMark Brown <broonie@kernel.org>2023-03-20 14:07:32 +0100
commitee357de34391b4d1a926c7ef736f1723d07feb9e (patch)
tree014c9076138e371824c4e5301aa6c9a9d07bdf22 /sound/soc/bcm
parentASoC: au1x: psc-i2s: Convert to platform remove callback returning void (diff)
downloadlinux-ee357de34391b4d1a926c7ef736f1723d07feb9e.tar.xz
linux-ee357de34391b4d1a926c7ef736f1723d07feb9e.zip
ASoC: bcm: bcm63xx-i2s-whistler: 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> Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Link: https://lore.kernel.org/r/20230315150745.67084-39-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/bcm')
-rw-r--r--sound/soc/bcm/bcm63xx-i2s-whistler.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/bcm/bcm63xx-i2s-whistler.c b/sound/soc/bcm/bcm63xx-i2s-whistler.c
index 2da1384ffe91..18c51dbbc8dc 100644
--- a/sound/soc/bcm/bcm63xx-i2s-whistler.c
+++ b/sound/soc/bcm/bcm63xx-i2s-whistler.c
@@ -289,10 +289,9 @@ static int bcm63xx_i2s_dev_probe(struct platform_device *pdev)
return ret;
}
-static int bcm63xx_i2s_dev_remove(struct platform_device *pdev)
+static void bcm63xx_i2s_dev_remove(struct platform_device *pdev)
{
bcm63xx_soc_platform_remove(pdev);
- return 0;
}
#ifdef CONFIG_OF
@@ -308,7 +307,7 @@ static struct platform_driver bcm63xx_i2s_driver = {
.of_match_table = of_match_ptr(snd_soc_bcm_audio_match),
},
.probe = bcm63xx_i2s_dev_probe,
- .remove = bcm63xx_i2s_dev_remove,
+ .remove_new = bcm63xx_i2s_dev_remove,
};
module_platform_driver(bcm63xx_i2s_driver);