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

index 0e4f65e654c4be38130a0e81add85142f06e9d6d..75e5e480fda285dd0103c461330b3a2c1dcdf945 100644 (file)
@@ -267,9 +267,10 @@ int axg_fifo_pcm_new(struct snd_soc_pcm_runtime *rtd, unsigned int type)
        struct snd_card *card = rtd->card->snd_card;
        size_t size = axg_fifo_hw.buffer_bytes_max;
 
-       return snd_pcm_lib_preallocate_pages(rtd->pcm->streams[type].substream,
-                                            SNDRV_DMA_TYPE_DEV, card->dev,
-                                            size, size);
+       snd_pcm_lib_preallocate_pages(rtd->pcm->streams[type].substream,
+                                     SNDRV_DMA_TYPE_DEV, card->dev,
+                                     size, size);
+       return 0;
 }
 EXPORT_SYMBOL_GPL(axg_fifo_pcm_new);