ALSA: core: Make snd_card_free_when_closed() return void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 7 Feb 2023 19:19:06 +0000 (20:19 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 8 Feb 2023 12:39:12 +0000 (13:39 +0100)
commit73c5685c431a090152cbc9e45857feb207f0032f
treeffd36921e758c12e44a2b34514120e99189087aa
parent663f922fd7a9e9342dca512db339c7fb2b59b8e6
ALSA: core: Make snd_card_free_when_closed() return void

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 <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-3-u.kleine-koenig@pengutronix.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/core.h
sound/core/init.c