提交 a14e7eb5 编写于 作者: L Lars-Peter Clausen 提交者: Takashi Iwai

ALSA: ps3: Remove unnecessary snd_pcm_lib_preallocate_free_for_all()

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: NLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 ef394acb
...@@ -1044,7 +1044,7 @@ static int snd_ps3_driver_probe(struct ps3_system_bus_device *dev) ...@@ -1044,7 +1044,7 @@ static int snd_ps3_driver_probe(struct ps3_system_bus_device *dev)
if (!the_card.null_buffer_start_vaddr) { if (!the_card.null_buffer_start_vaddr) {
pr_info("%s: nullbuffer alloc failed\n", __func__); pr_info("%s: nullbuffer alloc failed\n", __func__);
ret = -ENOMEM; ret = -ENOMEM;
goto clean_preallocate; goto clean_card;
} }
pr_debug("%s: null vaddr=%p dma=%#llx\n", __func__, pr_debug("%s: null vaddr=%p dma=%#llx\n", __func__,
the_card.null_buffer_start_vaddr, the_card.null_buffer_start_vaddr,
...@@ -1066,8 +1066,6 @@ static int snd_ps3_driver_probe(struct ps3_system_bus_device *dev) ...@@ -1066,8 +1066,6 @@ static int snd_ps3_driver_probe(struct ps3_system_bus_device *dev)
PAGE_SIZE, PAGE_SIZE,
the_card.null_buffer_start_vaddr, the_card.null_buffer_start_vaddr,
the_card.null_buffer_start_dma_addr); the_card.null_buffer_start_dma_addr);
clean_preallocate:
snd_pcm_lib_preallocate_free_for_all(the_card.pcm);
clean_card: clean_card:
snd_card_free(the_card.card); snd_card_free(the_card.card);
clean_irq: clean_irq:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册