media: s5p-mfc: Clear workbit to handle error condition
authorSmitha T Murthy <smitha.t@samsung.com>
Wed, 7 Sep 2022 10:32:26 +0000 (16:02 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2023 10:59:06 +0000 (11:59 +0100)
commitff27800c0a6d81571671b33f696109804d015409
tree550be21899f8d09439e6c27645f3afd12a47bb21
parent4653ba32adcd6bfdd04465c3c8d409a292be523c
media: s5p-mfc: Clear workbit to handle error condition

[ Upstream commit d3f3c2fe54e30b0636496d842ffbb5ad3a547f9b ]

During error on CLOSE_INSTANCE command, ctx_work_bits was not getting
cleared. During consequent mfc execution NULL pointer dereferencing of
this context led to kernel panic. This patch fixes this issue by making
sure to clear ctx_work_bits always.

Fixes: 818cd91ab8c6 ("[media] s5p-mfc: Extract open/close MFC instance commands")
Cc: stable@vger.kernel.org
Cc: linux-fsd@tesla.com
Signed-off-by: Smitha T Murthy <smitha.t@samsung.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c