Commit 06a55adc authored by Hans Verkuil's avatar Hans Verkuil Committed by sanglipeng
Browse files

media: platform: mediatek: vpu: fix NULL ptr dereference

stable inclusion
from stable-v5.10.192
commit 2caeb722f0ea5d2d24af30bb1753a89d449b6aa0
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I933RF

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=2caeb722f0ea5d2d24af30bb1753a89d449b6aa0



--------------------------------

[ Upstream commit 3df55cd7 ]

If pdev is NULL, then it is still dereferenced.

This fixes this smatch warning:

drivers/media/platform/mediatek/vpu/mtk_vpu.c:570 vpu_load_firmware() warn: address of NULL pointer 'pdev'

Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Yunfei Dong <yunfei.dong@mediatek.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 2cbee96a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment