diff options
author | Takashi Iwai <tiwai@suse.de> | 2019-02-04 16:32:09 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-02-06 10:29:09 +0100 |
commit | 5116b94af07a9775ed694562f354e931b2cc04d4 (patch) | |
tree | f3e8a2cd528c0f37f59fdaa07db6cf348d4a280d /sound/pci/echoaudio | |
parent | f32e5616005bb999fec6a2e914161805d7ad061f (diff) |
ALSA: pci: 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>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/echoaudio')
-rw-r--r-- | sound/pci/echoaudio/echoaudio.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c index 18d30d479b6b..ea876b0b02b9 100644 --- a/sound/pci/echoaudio/echoaudio.c +++ b/sound/pci/echoaudio/echoaudio.c @@ -884,17 +884,15 @@ static const struct snd_pcm_ops digital_capture_ops = { static int snd_echo_preallocate_pages(struct snd_pcm *pcm, struct device *dev) { struct snd_pcm_substream *ss; - int stream, err; + int stream; for (stream = 0; stream < 2; stream++) - for (ss = pcm->streams[stream].substream; ss; ss = ss->next) { - err = snd_pcm_lib_preallocate_pages(ss, SNDRV_DMA_TYPE_DEV_SG, - dev, - ss->number ? 0 : 128<<10, - 256<<10); - if (err < 0) - return err; - } + for (ss = pcm->streams[stream].substream; ss; ss = ss->next) + snd_pcm_lib_preallocate_pages(ss, SNDRV_DMA_TYPE_DEV_SG, + dev, + ss->number ? 0 : 128<<10, + 256<<10); + return 0; } |