summaryrefslogtreecommitdiffstats
path: root/sound/soc/mediatek
diff options
context:
space:
mode:
authorTakashi Iwai2019-02-04 16:39:15 +0100
committerTakashi Iwai2019-02-06 18:29:11 +0100
commit15486e63e7ce2794e6b82843ac6c57146080d98b (patch)
tree60df5924b43a7b2f27aa8d6f66ef2ca8ff80a894 /sound/soc/mediatek
parentASoC: intel: Drop superfluous PCM preallocation error checks (diff)
downloadkernel-qcow2-linux-15486e63e7ce2794e6b82843ac6c57146080d98b.tar.gz
kernel-qcow2-linux-15486e63e7ce2794e6b82843ac6c57146080d98b.tar.xz
kernel-qcow2-linux-15486e63e7ce2794e6b82843ac6c57146080d98b.zip
ASoC: mediatek: Drop superfluous PCM preallocation error checks
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>
Diffstat (limited to 'sound/soc/mediatek')
-rw-r--r--sound/soc/mediatek/common/mtk-afe-platform-driver.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/mediatek/common/mtk-afe-platform-driver.c b/sound/soc/mediatek/common/mtk-afe-platform-driver.c
index 697aa50aff9a..3ce527ce30ce 100644
--- a/sound/soc/mediatek/common/mtk-afe-platform-driver.c
+++ b/sound/soc/mediatek/common/mtk-afe-platform-driver.c
@@ -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);