ALSA: atmel: Drop superfluous PCM preallocation error checks
authorTakashi Iwai <tiwai@suse.de>
Mon, 4 Feb 2019 15:30:33 +0000 (16:30 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 6 Feb 2019 09:28:39 +0000 (10:28 +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/atmel/ac97c.c

index 380025887aef61e2aa87a7845d12a7d1ba9b85ae..33c87a0547a96e9dd034287067ab4f748fe818bc 100644 (file)
@@ -603,11 +603,9 @@ static int atmel_ac97c_pcm_new(struct atmel_ac97c *chip)
        snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &atmel_ac97_capture_ops);
        snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &atmel_ac97_playback_ops);
 
-       retval = snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
+       snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
                        &chip->pdev->dev, hw.periods_min * hw.period_bytes_min,
                        hw.buffer_bytes_max);
-       if (retval)
-               return retval;
 
        pcm->private_data = chip;
        pcm->info_flags = 0;