mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
media: cedrus: Add missing v4l2_ctrl_request_hdl_put()
[ Upstream commitb30063976f
] The check for a required control in the request was missing a call to v4l2_ctrl_request_hdl_put() in the error path. Fix it. Fixes:50e761516f
("media: platform: Add Cedrus VPU decoder driver") Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
3fe12f4be0
commit
e0a1bebc33
1 changed files with 6 additions and 1 deletions
|
@ -159,6 +159,7 @@ static int cedrus_request_validate(struct media_request *req)
|
|||
struct v4l2_ctrl *ctrl_test;
|
||||
unsigned int count;
|
||||
unsigned int i;
|
||||
int ret = 0;
|
||||
|
||||
list_for_each_entry(obj, &req->objects, list) {
|
||||
struct vb2_buffer *vb;
|
||||
|
@ -203,12 +204,16 @@ static int cedrus_request_validate(struct media_request *req)
|
|||
if (!ctrl_test) {
|
||||
v4l2_info(&ctx->dev->v4l2_dev,
|
||||
"Missing required codec control\n");
|
||||
return -ENOENT;
|
||||
ret = -ENOENT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
v4l2_ctrl_request_hdl_put(hdl);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return vb2_request_validate(req);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue