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

index abe031c9d592c53ad7a27edd8e2267e5b3b86ac1..521236efcc4d24e8654695eb1129990fd3708d2a 100644 (file)
@@ -1024,15 +1024,11 @@ static int snd_ps3_driver_probe(struct ps3_system_bus_device *dev)
 
        the_card.pcm->info_flags = SNDRV_PCM_INFO_NONINTERLEAVED;
        /* pre-alloc PCM DMA buffer*/
-       ret = snd_pcm_lib_preallocate_pages_for_all(the_card.pcm,
+       snd_pcm_lib_preallocate_pages_for_all(the_card.pcm,
                                        SNDRV_DMA_TYPE_DEV,
                                        &dev->core,
                                        SND_PS3_PCM_PREALLOC_SIZE,
                                        SND_PS3_PCM_PREALLOC_SIZE);
-       if (ret < 0) {
-               pr_info("%s: prealloc failed\n", __func__);
-               goto clean_card;
-       }
 
        /*
         * allocate null buffer