summaryrefslogtreecommitdiff
path: root/sound/soc/sh/siu_pcm.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-02-04 18:39:54 +0300
committerTakashi Iwai <tiwai@suse.de>2019-02-06 20:29:22 +0300
commitb76c7fe6c99d427a064e5e152dca7fe24f424f53 (patch)
treebf66ed2b3ac97aaa7559b3e48f16dfd0ec1c5b47 /sound/soc/sh/siu_pcm.c
parentfba3b09f185ebca89b93fbd606d335a717693d1f (diff)
downloadlinux-b76c7fe6c99d427a064e5e152dca7fe24f424f53.tar.xz
ASoC: sh: Drop superfluous PCM preallocation error checks
snd_pcm_lib_preallocate_pages() and co always succeed, so the error check is simply redundant. Drop it. Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> 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/sh/siu_pcm.c')
-rw-r--r--sound/soc/sh/siu_pcm.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/sound/soc/sh/siu_pcm.c b/sound/soc/sh/siu_pcm.c
index 23384c477740..78c3145b4109 100644
--- a/sound/soc/sh/siu_pcm.c
+++ b/sound/soc/sh/siu_pcm.c
@@ -541,15 +541,9 @@ static int siu_pcm_new(struct snd_soc_pcm_runtime *rtd)
if (ret < 0)
return ret;
- ret = snd_pcm_lib_preallocate_pages_for_all(pcm,
+ snd_pcm_lib_preallocate_pages_for_all(pcm,
SNDRV_DMA_TYPE_DEV, card->dev,
SIU_BUFFER_BYTES_MAX, SIU_BUFFER_BYTES_MAX);
- if (ret < 0) {
- dev_err(card->dev,
- "snd_pcm_lib_preallocate_pages_for_all() err=%d",
- ret);
- goto fail;
- }
(*port_info)->pcm = pcm;
@@ -562,11 +556,6 @@ static int siu_pcm_new(struct snd_soc_pcm_runtime *rtd)
dev_info(card->dev, "SuperH SIU driver initialized.\n");
return 0;
-
-fail:
- siu_free_port(siu_ports[pdev->id]);
- dev_err(card->dev, "SIU: failed to initialize.\n");
- return ret;
}
static void siu_pcm_free(struct snd_pcm *pcm)