Commit e3a8459d authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Mark Brown

ALSA: sh: aica: Drop if blocks with always false condition

snd_aica_remove() is only called after a successful call to
snd_aica_probe(). With the latter it's sure that platform_set_drvdata()
was called with a non-NULL argument. So platform_get_drvdata() won't return
NULL and the check can be dropped.

This prepares converting platform driver remove callbacks to return void.
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: default avatarTakashi Iwai <tiwai@suse.de>
Acked-by: default avatarNicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20230315150745.67084-2-u.kleine-koenig@pengutronix.deSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent e32acf7b
...@@ -543,8 +543,6 @@ static int snd_aica_remove(struct platform_device *devptr) ...@@ -543,8 +543,6 @@ static int snd_aica_remove(struct platform_device *devptr)
{ {
struct snd_card_aica *dreamcastcard; struct snd_card_aica *dreamcastcard;
dreamcastcard = platform_get_drvdata(devptr); dreamcastcard = platform_get_drvdata(devptr);
if (unlikely(!dreamcastcard))
return -ENODEV;
snd_card_free(dreamcastcard->card); snd_card_free(dreamcastcard->card);
kfree(dreamcastcard); kfree(dreamcastcard);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment