]> www.infradead.org Git - users/jedix/linux-maple.git/commit
media: verisilicon: Free post processor buffers on error
authorDetlev Casanova <detlev.casanova@collabora.com>
Fri, 25 Apr 2025 19:24:47 +0000 (15:24 -0400)
committerHans Verkuil <hverkuil@xs4all.nl>
Thu, 15 May 2025 06:13:31 +0000 (08:13 +0200)
commit11beb0fc346e00c412b3bfd19013206f6b655604
treebdd9def1852e83389bbf4575b9654b18173031ce
parent59f94c57b5175cd094f2ded4f0437217bce2447d
media: verisilicon: Free post processor buffers on error

During initialization, the post processor allocates the same number of
buffers as the buf queue.
As the init function is called in streamon(), if an allocation fails,
streamon will return an error and streamoff() will not be called, keeping
all post processor buffers allocated.

To avoid that, all post proc buffers are freed in case of an allocation
error.

Fixes: 26711491a807 ("media: verisilicon: Refactor postprocessor to store more buffers")
Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/platform/verisilicon/hantro_postproc.c