diff options
author | Takashi Iwai <tiwai@suse.de> | 2019-02-04 18:38:42 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-02-06 20:29:05 +0300 |
commit | 62961dd5f609b202080e7d9053de1a8967c9d4d8 (patch) | |
tree | 1f68b95b1e83c53e17381352103b1b0c63912153 /sound/soc/intel/baytrail | |
parent | ad8ba770ca67d283b3166a8baf71cb4e42e9c973 (diff) | |
download | linux-62961dd5f609b202080e7d9053de1a8967c9d4d8.tar.xz |
ASoC: intel: 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/intel/baytrail')
-rw-r--r-- | sound/soc/intel/baytrail/sst-baytrail-pcm.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/sound/soc/intel/baytrail/sst-baytrail-pcm.c b/sound/soc/intel/baytrail/sst-baytrail-pcm.c index aabb35bf6b96..aa358073ac0f 100644 --- a/sound/soc/intel/baytrail/sst-baytrail-pcm.c +++ b/sound/soc/intel/baytrail/sst-baytrail-pcm.c @@ -327,23 +327,16 @@ static int sst_byt_pcm_new(struct snd_soc_pcm_runtime *rtd) size_t size; struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME); struct sst_pdata *pdata = dev_get_platdata(component->dev); - int ret = 0; if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream || pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { size = sst_byt_pcm_hardware.buffer_bytes_max; - ret = snd_pcm_lib_preallocate_pages_for_all(pcm, - SNDRV_DMA_TYPE_DEV, - pdata->dma_dev, - size, size); - if (ret) { - dev_err(rtd->dev, "dma buffer allocation failed %d\n", - ret); - return ret; - } + snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, + pdata->dma_dev, + size, size); } - return ret; + return 0; } static struct snd_soc_dai_driver byt_dais[] = { |