aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/haswell
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-02-04 16:38:42 +0100
committerTakashi Iwai <tiwai@suse.de>2019-02-06 18:29:05 +0100
commit62961dd5f609b202080e7d9053de1a8967c9d4d8 (patch)
tree1f68b95b1e83c53e17381352103b1b0c63912153 /sound/soc/intel/haswell
parentASoC: dwc: Drop superfluous PCM preallocation error checks (diff)
downloadlinux-dev-62961dd5f609b202080e7d9053de1a8967c9d4d8.tar.xz
linux-dev-62961dd5f609b202080e7d9053de1a8967c9d4d8.zip
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/haswell')
-rw-r--r--sound/soc/intel/haswell/sst-haswell-pcm.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sound/soc/intel/haswell/sst-haswell-pcm.c b/sound/soc/intel/haswell/sst-haswell-pcm.c
index fe2c826e710c..f21a7f2c11c2 100644
--- a/sound/soc/intel/haswell/sst-haswell-pcm.c
+++ b/sound/soc/intel/haswell/sst-haswell-pcm.c
@@ -946,27 +946,21 @@ static int hsw_pcm_new(struct snd_soc_pcm_runtime *rtd)
struct sst_pdata *pdata = dev_get_platdata(component->dev);
struct hsw_priv_data *priv_data = dev_get_drvdata(component->dev);
struct device *dev = pdata->dma_dev;
- int ret = 0;
if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream ||
pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) {
- ret = snd_pcm_lib_preallocate_pages_for_all(pcm,
+ snd_pcm_lib_preallocate_pages_for_all(pcm,
SNDRV_DMA_TYPE_DEV_SG,
dev,
hsw_pcm_hardware.buffer_bytes_max,
hsw_pcm_hardware.buffer_bytes_max);
- if (ret) {
- dev_err(rtd->dev, "dma buffer allocation failed %d\n",
- ret);
- return ret;
- }
}
if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream)
priv_data->pcm[rtd->cpu_dai->id][SNDRV_PCM_STREAM_PLAYBACK].hsw_pcm = pcm;
if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream)
priv_data->pcm[rtd->cpu_dai->id][SNDRV_PCM_STREAM_CAPTURE].hsw_pcm = pcm;
- return ret;
+ return 0;
}
#define HSW_FORMATS \