Skip to content

Commit

Permalink
ASoC: xtensa: Drop superfluous PCM preallocation error checks
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
tiwai committed Feb 6, 2019
1 parent c87592f commit 8eea18f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sound/soc/xtensa/xtfpga-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -469,9 +469,9 @@ static int xtfpga_pcm_new(struct snd_soc_pcm_runtime *rtd)
struct snd_card *card = rtd->card->snd_card;
size_t size = xtfpga_pcm_hardware.buffer_bytes_max;

return snd_pcm_lib_preallocate_pages_for_all(rtd->pcm,
SNDRV_DMA_TYPE_DEV,
card->dev, size, size);
snd_pcm_lib_preallocate_pages_for_all(rtd->pcm, SNDRV_DMA_TYPE_DEV,
card->dev, size, size);
return 0;
}

static const struct snd_pcm_ops xtfpga_pcm_ops = {
Expand Down

0 comments on commit 8eea18f

Please sign in to comment.