diff options
author | Takashi Iwai <tiwai@suse.de> | 2019-02-04 10:32:09 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-02-06 04:29:09 -0500 |
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 = { | |||
884 | static int snd_echo_preallocate_pages(struct snd_pcm *pcm, struct device *dev) | 884 | static int snd_echo_preallocate_pages(struct snd_pcm *pcm, struct device *dev) |
885 | { | 885 | { |
886 | struct snd_pcm_substream *ss; | 886 | struct snd_pcm_substream *ss; |
887 | int stream, err; | 887 | int stream; |
888 | 888 | ||
889 | for (stream = 0; stream < 2; stream++) | 889 | for (stream = 0; stream < 2; stream++) |
890 | for (ss = pcm->streams[stream].substream; ss; ss = ss->next) { | 890 | for (ss = pcm->streams[stream].substream; ss; ss = ss->next) |
891 | err = snd_pcm_lib_preallocate_pages(ss, SNDRV_DMA_TYPE_DEV_SG, | 891 | snd_pcm_lib_preallocate_pages(ss, SNDRV_DMA_TYPE_DEV_SG, |
892 | dev, | 892 | dev, |
893 | ss->number ? 0 : 128<<10, | 893 | ss->number ? 0 : 128<<10, |
894 | 256<<10); | 894 | 256<<10); |
895 | if (err < 0) | 895 | |
896 | return err; | ||
897 | } | ||
898 | return 0; | 896 | return 0; |
899 | } | 897 | } |
900 | 898 | ||