]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: mediatek: Drop superfluous PCM preallocation error checks
authorTakashi Iwai <tiwai@suse.de>
Mon, 4 Feb 2019 15:39:15 +0000 (16:39 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 6 Feb 2019 17:29:11 +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/mediatek/common/mtk-afe-platform-driver.c

index 697aa50aff9a7fc6b78ab809a40b721bd5ae0f3f..3ce527ce30ce0610ee107a37a0543aa14dce7fb8 100644 (file)
@@ -126,9 +126,9 @@ int mtk_afe_pcm_new(struct snd_soc_pcm_runtime *rtd)
        struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
 
        size = afe->mtk_afe_hardware->buffer_bytes_max;
-       return snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                                    afe->dev,
-                                                    size, size);
+       snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
+                                             afe->dev, size, size);
+       return 0;
 }
 EXPORT_SYMBOL_GPL(mtk_afe_pcm_new);