diff options
| author | Zhao Dongdong <zhaodongdong@kylinos.cn> | 2026-07-07 10:11:39 +0800 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2026-07-07 16:16:05 +0200 |
| commit | f16eaa38ea640884f66d24865c770c3f6c43bd42 (patch) | |
| tree | cb74e77a20cb485b8f2700dade410cedbce29178 /tools/perf/scripts/python/bin | |
| parent | bd8f2187618980f5274a74321ea4844df8667488 (diff) | |
ALSA: hda/core: add cleanup in snd_hdac_bus_alloc_stream_pages()
The current error handling in snd_hdac_bus_alloc_stream_pages()
returns directly on failure without cleaning up already allocated
resources. While callers are supposed to release those via
snd_hdac_bus_free_stream_pages() at destructor, adding explicit
cleanup makes the function more self-contained and safer against
future misuse.
Add proper error cleanup path using goto labels to free previously
allocated BDL DMA buffers, position buffer, and ring buffer in
reverse allocation order.
Signed-off-by: Zhao Dongdong <zhaodongdong@kylinos.cn>
Link: https://patch.msgid.link/tencent_8E5BBBD19D53B1EFCDB6E89F3B6246A70B06@qq.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
