]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ALSA: parisc: Drop superfluous PCM preallocation error checks
authorTakashi Iwai <tiwai@suse.de>
Mon, 4 Feb 2019 15:31:42 +0000 (16:31 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 6 Feb 2019 09:29:03 +0000 (10:29 +0100)
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>
sound/parisc/harmony.c

index f36e7006e00cab443d3072a5feb1146246e29022..a4264b8943f05791e72d44b03a7e0a9c775a62ff 100644 (file)
@@ -669,14 +669,8 @@ snd_harmony_pcm_init(struct snd_harmony *h)
        }
 
        /* pre-allocate space for DMA */
-       err = snd_pcm_lib_preallocate_pages_for_all(pcm, h->dma.type,
-                                                   h->dma.dev,
-                                                   MAX_BUF_SIZE, 
-                                                   MAX_BUF_SIZE);
-       if (err < 0) {
-               printk(KERN_ERR PFX "buffer allocation error: %d\n", err);
-               return err;
-       }
+       snd_pcm_lib_preallocate_pages_for_all(pcm, h->dma.type, h->dma.dev,
+                                             MAX_BUF_SIZE, MAX_BUF_SIZE);
 
        h->st.format = snd_harmony_set_data_format(h,
                SNDRV_PCM_FORMAT_S16_BE, 1);