summaryrefslogtreecommitdiff
path: root/sound/core
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2023-02-07 22:19:07 +0300
committerTakashi Iwai <tiwai@suse.de>2023-02-08 15:39:27 +0300
commit25a5a77ae0bc55376cac8eedd138669ca2e3699a (patch)
tree3a1fc9c8ac33ba1fbb1b1a117509393f532dc72c /sound/core
parent73c5685c431a090152cbc9e45857feb207f0032f (diff)
downloadlinux-25a5a77ae0bc55376cac8eedd138669ca2e3699a.tar.xz
ALSA: core: Make snd_card_free() return void
The function returns 0 unconditionally. Make it return void instead and simplify all callers accordingly. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Jaroslav Kysela <perex@perex.cz> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Acked-by: Geoff Levand <geoff@infradead.org> Acked-by: Thierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20230207191907.467756-4-u.kleine-koenig@pengutronix.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/init.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/core/init.c b/sound/core/init.c
index 6bb3e2b77971..df0c22480375 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -632,7 +632,7 @@ EXPORT_SYMBOL(snd_card_free_when_closed);
* Return: Zero. Frees all associated devices and frees the control
* interface associated to given soundcard.
*/
-int snd_card_free(struct snd_card *card)
+void snd_card_free(struct snd_card *card)
{
DECLARE_COMPLETION_ONSTACK(released);
@@ -643,15 +643,13 @@ int snd_card_free(struct snd_card *card)
* the check here at the beginning.
*/
if (card->releasing)
- return 0;
+ return;
card->release_completion = &released;
snd_card_free_when_closed(card);
/* wait, until all devices are ready for the free operation */
wait_for_completion(&released);
-
- return 0;
}
EXPORT_SYMBOL(snd_card_free);