[PATCH 001/173] ALSA: sh: aica: Drop if blocks with always false condition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
---
 sound/sh/aica.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sound/sh/aica.c b/sound/sh/aica.c
index 6e9d6bd67369..459c907655d9 100644
--- a/sound/sh/aica.c
+++ b/sound/sh/aica.c
@@ -543,8 +543,6 @@ static int snd_aica_remove(struct platform_device *devptr)
 {
 	struct snd_card_aica *dreamcastcard;
 	dreamcastcard = platform_get_drvdata(devptr);
-	if (unlikely(!dreamcastcard))
-		return -ENODEV;
 	snd_card_free(dreamcastcard->card);
 	kfree(dreamcastcard);
 	return 0;
-- 
2.39.2




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux