linux-brain/drivers/media/platform/qcom
Colin Ian King f865b316cc media: venus: venc: Fix potential null pointer dereference on pointer fmt
[ Upstream commit 09ea9719a423fc675d40dd05407165e161ea0c48 ]

Currently the call to find_format can potentially return a NULL to
fmt and the nullpointer is later dereferenced on the assignment of
pixmp->num_planes = fmt->num_planes.  Fix this by adding a NULL pointer
check and returning NULL for the failure case.

Addresses-Coverity: ("Dereference null return")

Fixes: aaaa93eda6 ("[media] media: venus: venc: add video encoder files")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-15 09:47:33 +02:00
..
camss media: camss: missing error code in msm_video_register() 2021-03-04 10:26:20 +01:00
venus media: venus: venc: Fix potential null pointer dereference on pointer fmt 2021-09-15 09:47:33 +02:00