From 73c5685c431a090152cbc9e45857feb207f0032f Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Tue, 7 Feb 2023 20:19:06 +0100 Subject: ALSA: core: Make snd_card_free_when_closed() return void MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All callers from other files ignore the return value of this function. And it can only ever return a non-zero value if the parameter card is NULL. This cannot happen in snd_card_free() as card was dereferenced just before snd_card_free_when_closed() is called. So the error handling can be dropped there. 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-3-u.kleine-koenig@pengutronix.de Signed-off-by: Takashi Iwai --- include/sound/core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/sound') diff --git a/include/sound/core.h b/include/sound/core.h index 9a73c60b6f1e..21884c979c17 100644 --- a/include/sound/core.h +++ b/include/sound/core.h @@ -289,7 +289,7 @@ int snd_devm_card_new(struct device *parent, int idx, const char *xid, void snd_card_disconnect(struct snd_card *card); void snd_card_disconnect_sync(struct snd_card *card); int snd_card_free(struct snd_card *card); -int snd_card_free_when_closed(struct snd_card *card); +void snd_card_free_when_closed(struct snd_card *card); int snd_card_free_on_error(struct device *dev, int ret); void snd_card_set_id(struct snd_card *card, const char *id); int snd_card_register(struct snd_card *card); -- cgit