]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
media: vicodec: add missing v4l2_ctrl_request_hdl_put()
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 12 Aug 2020 10:30:33 +0000 (12:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Sep 2020 17:12:26 +0000 (19:12 +0200)
[ Upstream commit 2e7c8fb8942773f412fe12f3b63e8bb92c18ab3f ]

The check for a required control in the request was missing a call to
v4l2_ctrl_request_hdl_put(), so the control request object was never
released.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Fixes: 997deb811bf5 ("media: vicodec: Add support for stateless decoder.")
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/vicodec/vicodec-core.c

index 84ec36156f73f4d7ccb8ca516d27b82e91dfc48c..c77281d43f892cd82ae5a16c4d8246dc50cafc10 100644 (file)
@@ -2052,6 +2052,7 @@ static int vicodec_request_validate(struct media_request *req)
        }
        ctrl = v4l2_ctrl_request_hdl_ctrl_find(hdl,
                                               vicodec_ctrl_stateless_state.id);
+       v4l2_ctrl_request_hdl_put(hdl);
        if (!ctrl) {
                v4l2_info(&ctx->dev->v4l2_dev,
                          "Missing required codec control\n");