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

index 7609eceba1a2dc3b5adf1e145c8743be1327b918..fc34c863b93cc5a4065d5e1def36e2dc2d677d0e 100644 (file)
@@ -2243,12 +2243,9 @@ static int snd_dbri_pcm(struct snd_card *card)
        pcm->info_flags = 0;
        strcpy(pcm->name, card->shortname);
 
-       if ((err = snd_pcm_lib_preallocate_pages_for_all(pcm,
-                       SNDRV_DMA_TYPE_CONTINUOUS,
-                       snd_dma_continuous_data(GFP_KERNEL),
-                       64 * 1024, 64 * 1024)) < 0)
-               return err;
-
+       snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS,
+                                             snd_dma_continuous_data(GFP_KERNEL),
+                                             64 * 1024, 64 * 1024);
        return 0;
 }