ASoC: txx9: Drop superfluous PCM preallocation error checks
authorTakashi Iwai <tiwai@suse.de>
Mon, 4 Feb 2019 15:40:37 +0000 (16:40 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 6 Feb 2019 17:29:33 +0000 (18:29 +0100)
snd_pcm_lib_preallocate_pages() and co always succeed, so the error
check is simply redundant.  Drop it.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/soc/txx9/txx9aclc.c

index 8d31fe628e2f5fdc9a18fc2b4e6ba8dcde316c4c..089bd751860643a432fee7525e15285058ede106 100644 (file)
@@ -313,8 +313,10 @@ static int txx9aclc_pcm_new(struct snd_soc_pcm_runtime *rtd)
                if (ret)
                        goto exit;
        }
-       return snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
+
+       snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
                card->dev, 64 * 1024, 4 * 1024 * 1024);
+       return 0;
 
 exit:
        for (i = 0; i < 2; i++) {