Skip to content

Commit

Permalink
ALSA: sparc: Drop superfluous PCM preallocation error checks
Browse files Browse the repository at this point in the history
snd_pcm_lib_preallocate_pages() and co always succeed, so the error
check is simply redundant.  Drop it.

Reviewed-by: Jaroslav Kysela <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Feb 6, 2019
1 parent 2462bca commit 1267e24
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions sound/sparc/dbri.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 1267e24

Please sign in to comment.