]> git.baikalelectronics.ru Git - kernel.git/commit
[media] VPU: mediatek: fix null pointer dereference on pdev
authorColin Ian King <colin.king@canonical.com>
Wed, 7 Sep 2016 17:10:27 +0000 (14:10 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 21 Oct 2016 14:09:34 +0000 (12:09 -0200)
commitd0bfcb89756d8db3629aa9b2c6577926943de3f7
treefd5b20ed9a05cc28325773f428dc092606e479e4
parent9767334141738d51a97b1d7a7ce8bb3ebe236109
[media] VPU: mediatek: fix null pointer dereference on pdev

pdev is being null checked, however, prior to that it is being
dereferenced by platform_get_drvdata.  Move the assignments of
vpu and run to after the pdev null check to avoid a potential
null pointer dereference.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Tiffany Lin <tiffany.lin@mediatek.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/mtk-vpu/mtk_vpu.c