From 25a5a77ae0bc55376cac8eedd138669ca2e3699a Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Tue, 7 Feb 2023 20:19:07 +0100 Subject: ALSA: core: Make snd_card_free() return void MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The function returns 0 unconditionally. Make it return void instead and simplify all callers accordingly. Signed-off-by: Uwe Kleine-König Reviewed-by: Jaroslav Kysela Reviewed-by: Takashi Sakamoto Acked-by: Geoff Levand Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20230207191907.467756-4-u.kleine-koenig@pengutronix.de Signed-off-by: Takashi Iwai --- sound/core/init.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sound/core') 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); -- cgit v1.2.3