Commit 9e710dc9 authored by Detlev Casanova's avatar Detlev Casanova Committed by Greg Kroah-Hartman
Browse files

media: verisilicon: Free post processor buffers on error



[ Upstream commit 11beb0fc ]

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: 26711491 ("media: verisilicon: Refactor postprocessor to store more buffers")
Signed-off-by: default avatarDetlev Casanova <detlev.casanova@collabora.com>
Reviewed-by: default avatarNicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: default avatarNicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 7b6050a9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment