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/aw2/aw2-alsa.c | 40 ++++++++++++---------------------------- 1 file changed, 12 insertions(+), 28 deletions(-) (limited to 'sound/pci/aw2') diff --git a/sound/pci/aw2/aw2-alsa.c b/sound/pci/aw2/aw2-alsa.c index 9a49e4243a9c..b07c5fc1da56 100644 --- a/sound/pci/aw2/aw2-alsa.c +++ b/sound/pci/aw2/aw2-alsa.c @@ -624,15 +624,10 @@ static int snd_aw2_new_pcm(struct aw2 *chip) /* pre-allocation of buffers */ /* Preallocate continuous pages. */ - err = snd_pcm_lib_preallocate_pages_for_all(pcm_playback_ana, - SNDRV_DMA_TYPE_DEV, - snd_dma_pci_data - (chip->pci), - 64 * 1024, 64 * 1024); - if (err) - dev_err(chip->card->dev, - "snd_pcm_lib_preallocate_pages_for_all error (0x%X)\n", - err); + snd_pcm_lib_preallocate_pages_for_all(pcm_playback_ana, + SNDRV_DMA_TYPE_DEV, + snd_dma_pci_data(chip->pci), + 64 * 1024, 64 * 1024); err = snd_pcm_new(chip->card, "Audiowerk2 digital playback", 1, 1, 0, &pcm_playback_num); @@ -661,15 +656,10 @@ static int snd_aw2_new_pcm(struct aw2 *chip) /* pre-allocation of buffers */ /* Preallocate continuous pages. */ - err = snd_pcm_lib_preallocate_pages_for_all(pcm_playback_num, - SNDRV_DMA_TYPE_DEV, - snd_dma_pci_data - (chip->pci), - 64 * 1024, 64 * 1024); - if (err) - dev_err(chip->card->dev, - "snd_pcm_lib_preallocate_pages_for_all error (0x%X)\n", - err); + snd_pcm_lib_preallocate_pages_for_all(pcm_playback_num, + SNDRV_DMA_TYPE_DEV, + snd_dma_pci_data(chip->pci), + 64 * 1024, 64 * 1024); err = snd_pcm_new(chip->card, "Audiowerk2 capture", 2, 0, 1, &pcm_capture); @@ -699,16 +689,10 @@ static int snd_aw2_new_pcm(struct aw2 *chip) /* pre-allocation of buffers */ /* Preallocate continuous pages. */ - err = snd_pcm_lib_preallocate_pages_for_all(pcm_capture, - SNDRV_DMA_TYPE_DEV, - snd_dma_pci_data - (chip->pci), - 64 * 1024, 64 * 1024); - if (err) - dev_err(chip->card->dev, - "snd_pcm_lib_preallocate_pages_for_all error (0x%X)\n", - err); - + snd_pcm_lib_preallocate_pages_for_all(pcm_capture, + SNDRV_DMA_TYPE_DEV, + snd_dma_pci_data(chip->pci), + 64 * 1024, 64 * 1024); /* Create control */ err = snd_ctl_add(chip->card, snd_ctl_new1(&aw2_control, chip)); -- cgit v1.2.3-59-g8ed1b