]> git.baikalelectronics.ru Git - kernel.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)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sun, 23 Jan 2022 20:18:42 +0000 (21:18 +0100)
commit575c984d9dd60884bc326ae23b66eb7714ba131d
tree4d2115f9e3e525455a9b2c98dc0c482c958e62c1
parentf585a2466accf116fb9103206e4b0725bcaafa9a
media: mtk-vcodec: potential dereference of null pointer

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

Fixes: fafd78fc5a05 ("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>
drivers/media/platform/mtk-vcodec/mtk_vcodec_fw_vpu.c