Skip to content

Commit

Permalink
ALSA: ps3: Remove unnecessary snd_pcm_lib_preallocate_free_for_all()
Browse files Browse the repository at this point in the history
The ALSA core takes care that all preallocated memory is freed when the card
(and the PCM) itself is freed. There is no need to do this manually in the
driver.

Signed-off-by: Lars-Peter Clausen <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
larsclausen authored and tiwai committed Jan 2, 2015
1 parent ef394ac commit a14e7eb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions sound/ppc/snd_ps3.c
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,7 @@ static int snd_ps3_driver_probe(struct ps3_system_bus_device *dev)
if (!the_card.null_buffer_start_vaddr) {
pr_info("%s: nullbuffer alloc failed\n", __func__);
ret = -ENOMEM;
goto clean_preallocate;
goto clean_card;
}
pr_debug("%s: null vaddr=%p dma=%#llx\n", __func__,
the_card.null_buffer_start_vaddr,
Expand All @@ -1066,8 +1066,6 @@ static int snd_ps3_driver_probe(struct ps3_system_bus_device *dev)
PAGE_SIZE,
the_card.null_buffer_start_vaddr,
the_card.null_buffer_start_dma_addr);
clean_preallocate:
snd_pcm_lib_preallocate_free_for_all(the_card.pcm);
clean_card:
snd_card_free(the_card.card);
clean_irq:
Expand Down

0 comments on commit a14e7eb

Please sign in to comment.