[06/20] ALSA: sparc: Drop superfluous PCM preallocation error checks
diff mbox series

Message ID 20190205194221.25924-7-tiwai@suse.de
State New
Headers show
Series
  • ALSA: Drop superfluous PCM preallocation error checks
Related show

Commit Message

Takashi Iwai Feb. 5, 2019, 7:42 p.m. UTC
snd_pcm_lib_preallocate_pages() and co always succeed, so the error
check is simply redundant.  Drop it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/sparc/dbri.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

Patch
diff mbox series

diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c
index 7609eceba1a2..fc34c863b93c 100644
--- a/sound/sparc/dbri.c
+++ b/sound/sparc/dbri.c
@@ -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;
 }