aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/atom
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/atom
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/atom')
-rw-r--r--sound/soc/intel/atom/sst-mfld-platform-pcm.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sound/soc/intel/atom/sst-mfld-platform-pcm.c b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
index 91a2436ce952..985abda3bfbb 100644
--- a/sound/soc/intel/atom/sst-mfld-platform-pcm.c
+++ b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
@@ -687,20 +687,15 @@ static int sst_pcm_new(struct snd_soc_pcm_runtime *rtd)
{
struct snd_soc_dai *dai = rtd->cpu_dai;
struct snd_pcm *pcm = rtd->pcm;
- int retval = 0;
if (dai->driver->playback.channels_min ||
dai->driver->capture.channels_min) {
- retval = snd_pcm_lib_preallocate_pages_for_all(pcm,
+ snd_pcm_lib_preallocate_pages_for_all(pcm,
SNDRV_DMA_TYPE_CONTINUOUS,
snd_dma_continuous_data(GFP_DMA),
SST_MIN_BUFFER, SST_MAX_BUFFER);
- if (retval) {
- dev_err(rtd->dev, "dma buffer allocation failure\n");
- return retval;
- }
}
- return retval;
+ return 0;
}
static int sst_soc_probe(struct snd_soc_component *component)