summaryrefslogtreecommitdiff
path: root/drivers/media/platform/qcom/venus
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2023-06-14 16:06:47 +0300
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2023-07-25 11:35:00 +0300
commitcf10b0bb503c974ba049d6f888b21178be20a962 (patch)
treeb4a7a19d3eccf4b664979272af56f2e580191c11 /drivers/media/platform/qcom/venus
parentbe40f524b6edac4fb9a98ef79620fd9b9497a998 (diff)
downloadlinux-cf10b0bb503c974ba049d6f888b21178be20a962.tar.xz
media: mediatek: vcodec: fix resource leaks in vdec_msg_queue_init()
If we encounter any error in the vdec_msg_queue_init() then we need to set "msg_queue->wdma_addr.size = 0;". Normally, this is done inside the vdec_msg_queue_deinit() function. However, if the first call to allocate &msg_queue->wdma_addr fails, then the vdec_msg_queue_deinit() function is a no-op. For that situation, just set the size to zero explicitly and return. There were two other error paths which did not clean up before returning. Change those error paths to goto mem_alloc_err. Fixes: b199fe46f35c ("media: mtk-vcodec: Add msg queue feature for lat and core architecture") Fixes: 2f5d0aef37c6 ("media: mediatek: vcodec: support stateless AV1 decoder") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/platform/qcom/venus')
0 files changed, 0 insertions, 0 deletions