Skip to content

Commit

Permalink
ALSA: ppc: 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 <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
tiwai committed Feb 6, 2019
1 parent 5116b94 commit c025672
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions sound/ppc/snd_ps3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c025672

Please sign in to comment.