]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: mtk-vcodec: fix access to incorrect planes member
authorAlexandre Courbot <acourbot@chromium.org>
Tue, 26 Mar 2019 07:44:23 +0000 (03:44 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 May 2019 13:43:45 +0000 (06:43 -0700)
commitd1d090c475348da13e3507e49a837c26632a1736
tree8c940f4c8ceb90aef11dcd5b7c190cac577934ca
parent44f212eb2aafbd2e62fad86d76200fdafe72cafd
media: mtk-vcodec: fix access to incorrect planes member

[ Upstream commit 52fafc58c3535c9f4f53864686dbaee3bcbadcb4 ]

Commit 0650a91499e0 ("media: mtk-vcodec: Correct return type for mem2mem
buffer helpers") fixed the return types for mem2mem buffer helper
functions by changing a few local variables from vb2_buffer to
vb2_v4l2_buffer. However, it left a few accesses to vb2_buffer::planes
as-is, accidentally turning them into accesses to
vb2_v4l2_buffer::planes and resulting in values being read from/written
to the wrong place.

Fix this by inserting vb2_buf into these accesses so they mimic their
original behavior.

Fixes: 0650a91499e0 ("media: mtk-vcodec: Correct return type for mem2mem buffer helpers")
Signed-off-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c