From 5116b94af07a9775ed694562f354e931b2cc04d4 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 4 Feb 2019 16:32:09 +0100 Subject: 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 Signed-off-by: Takashi Iwai --- sound/pci/ad1889.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'sound/pci/ad1889.c') 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; } -- cgit v1.2.3