summaryrefslogtreecommitdiff
path: root/sound/pci/ad1889.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-02-04 18:32:09 +0300
committerTakashi Iwai <tiwai@suse.de>2019-02-06 12:29:09 +0300
commit5116b94af07a9775ed694562f354e931b2cc04d4 (patch)
treef3e8a2cd528c0f37f59fdaa07db6cf348d4a280d /sound/pci/ad1889.c
parentf32e5616005bb999fec6a2e914161805d7ad061f (diff)
downloadlinux-5116b94af07a9775ed694562f354e931b2cc04d4.tar.xz
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/ad1889.c')
-rw-r--r--sound/pci/ad1889.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sound/pci/ad1889.c b/sound/pci/ad1889.c
index d9c54c08e2db..410fefe5ebde 100644
--- a/sound/pci/ad1889.c
+++ b/sound/pci/ad1889.c
@@ -644,16 +644,11 @@ snd_ad1889_pcm_init(struct snd_ad1889 *chip, int device)
chip->psubs = NULL;
chip->csubs = NULL;
- err = snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
+ snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
snd_dma_pci_data(chip->pci),
BUFFER_BYTES_MAX / 2,
BUFFER_BYTES_MAX);
- if (err < 0) {
- dev_err(chip->card->dev, "buffer allocation error: %d\n", err);
- return err;
- }
-
return 0;
}