summaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorTakashi Iwai2019-02-04 16:40:22 +0100
committerTakashi Iwai2019-02-06 18:29:28 +0100
commit18183edaad8d6a86ae8ac90ecf852527a207aad5 (patch)
tree4c49d109b16ea5b48ec8178e4207ea8e6a2342ec /sound/soc
parentASoC: sh: Drop superfluous PCM preallocation error checks (diff)
downloadkernel-qcow2-linux-18183edaad8d6a86ae8ac90ecf852527a207aad5.tar.gz
kernel-qcow2-linux-18183edaad8d6a86ae8ac90ecf852527a207aad5.tar.xz
kernel-qcow2-linux-18183edaad8d6a86ae8ac90ecf852527a207aad5.zip
ASoC: stm: 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')
-rw-r--r--sound/soc/stm/stm32_adfsdm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/stm/stm32_adfsdm.c b/sound/soc/stm/stm32_adfsdm.c
index 706ff005234f..47901983a6ff 100644
--- a/sound/soc/stm/stm32_adfsdm.c
+++ b/sound/soc/stm/stm32_adfsdm.c
@@ -262,8 +262,9 @@ static int stm32_adfsdm_pcm_new(struct snd_soc_pcm_runtime *rtd)
snd_soc_dai_get_drvdata(rtd->cpu_dai);
unsigned int size = DFSDM_MAX_PERIODS * DFSDM_MAX_PERIOD_SIZE;
- return snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
- priv->dev, size, size);
+ snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
+ priv->dev, size, size);
+ return 0;
}
static void stm32_adfsdm_pcm_free(struct snd_pcm *pcm)