media: tw5864: Fix possible NULL pointer dereference in tw5864_handle_frame
authorYueHaibing <yuehaibing@huawei.com>
Fri, 15 Mar 2019 02:01:24 +0000 (22:01 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:50:35 +0000 (14:50 +0100)
commit30fd5b16c9081afebe74d4d614fe582ff84ef6b2
tree113913f269cf9c3fe06df1a6c09899019738017d
parent53836b6ec72b0cf4b0a48a22fa3a102e7204339a
media: tw5864: Fix possible NULL pointer dereference in tw5864_handle_frame

[ Upstream commit 2e7682ebfc750177a4944eeb56e97a3f05734528 ]

'vb' null check should be done before dereferencing it in
tw5864_handle_frame, otherwise a NULL pointer dereference
may occur.

Fixes: 34d1324edd31 ("[media] pci: Add tw5864 driver")

Signed-off-by: YueHaibing <yuehaibing@huawei.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/pci/tw5864/tw5864-video.c