ASoC: xtensa: Drop superfluous PCM preallocation error checks
authorTakashi Iwai <tiwai@suse.de>
Mon, 4 Feb 2019 15:41:09 +0000 (16:41 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 6 Feb 2019 17:29:44 +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/xtensa/xtfpga-i2s.c

index 5035609166202da0fcdc6b9d383b95eba79f14be..2f20a02c8d4674cda4ae9c849cc75bcc9e12c28d 100644 (file)
@@ -469,9 +469,9 @@ static int xtfpga_pcm_new(struct snd_soc_pcm_runtime *rtd)
        struct snd_card *card = rtd->card->snd_card;
        size_t size = xtfpga_pcm_hardware.buffer_bytes_max;
 
-       return snd_pcm_lib_preallocate_pages_for_all(rtd->pcm,
-                                                    SNDRV_DMA_TYPE_DEV,
-                                                    card->dev, size, size);
+       snd_pcm_lib_preallocate_pages_for_all(rtd->pcm, SNDRV_DMA_TYPE_DEV,
+                                             card->dev, size, size);
+       return 0;
 }
 
 static const struct snd_pcm_ops xtfpga_pcm_ops = {