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

index 2b26311405a422206e869ce186bd17255a847d0a..e7fef3fce44a7467dfebc8efb355373f3f0cba8f 100644 (file)
@@ -464,14 +464,12 @@ static int __init snd_aicapcmchip(struct snd_card_aica
        snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK,
                        &snd_aicapcm_playback_ops);
        /* Allocate the DMA buffers */
-       err =
-           snd_pcm_lib_preallocate_pages_for_all(pcm,
-                                                 SNDRV_DMA_TYPE_CONTINUOUS,
-                                                 snd_dma_continuous_data
-                                                 (GFP_KERNEL),
-                                                 AICA_BUFFER_SIZE,
-                                                 AICA_BUFFER_SIZE);
-       return err;
+       snd_pcm_lib_preallocate_pages_for_all(pcm,
+                                             SNDRV_DMA_TYPE_CONTINUOUS,
+                                             snd_dma_continuous_data(GFP_KERNEL),
+                                             AICA_BUFFER_SIZE,
+                                             AICA_BUFFER_SIZE);
+       return 0;
 }
 
 /* Mixer controls */