]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: mtk-vcodec: potential dereference of null pointer
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Wed, 15 Dec 2021 05:21:57 +0000 (06:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 11:57:42 +0000 (13:57 +0200)
commit0aeb244eb2fddbbc34f2227cf3fd85c86e111c9a
tree16ba6faa51664bd1dc96539a043547ef87ca4ce8
parent3c6ec01525254e4489c6e60df2a8c48ee81f6f78
media: mtk-vcodec: potential dereference of null pointer

[ Upstream commit e25a89f743b18c029bfbe5e1663ae0c7190912b0 ]

The return value of devm_kzalloc() needs to be checked.
To avoid use of null pointer in case of thefailure of alloc.

Fixes: 46233e91fa24 ("media: mtk-vcodec: move firmware implementations into their own files")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Reviewed-by: Tzung-Bi Shih <tzungbi@google.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/mtk-vcodec/mtk_vcodec_fw_vpu.c