]> git.baikalelectronics.ru Git - kernel.git/commit
media: mc-request.c: allow object_bind in QUEUED state
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 2 Jun 2021 08:42:28 +0000 (10:42 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 2 Jun 2021 09:41:54 +0000 (11:41 +0200)
commit305e3e4e9c6ce52c8d0130f5f4194ebb7ef33f3d
tree067ccf5cfdcaba6a8aea0b6b20476f84b8eefdce
parent382711ca24683dd2d221299ef3f595438674ffe1
media: mc-request.c: allow object_bind in QUEUED state

If a request was queued without a control handler object, and
a control handler object is then created and bound to the request
when copying controls on request completion, then a WARN_ON in
mc-request.c is triggered since at that time the request is in
state QUEUED, and not UPDATING.

But this is too strict, and in this case it must also allow
binding objects when in state QUEUED.

This patch was unfortunately lost when the "always copy the controls
on completion" patch was posted, it should have been part of that
commit.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Fixes: cb1af320be94 ("media: v4l2-ctrls: always copy the controls on completion")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/mc/mc-request.c