video: driver: fix faulty msm_vidc_vmem_alloc() failures

Sometimes uninitialized local pointer variables were passed to
msm_vidc_vmem_alloc() call for allocating memory. Uninitialized
variables might garbage value, so msm_vidc_vmem_alloc() is
treating that double alloc request and returning error. So i.e
leading to undefined behaviour.

For e.x, msm_vidc_update_input_cr() call will never add any
entries into &inst->enc_input_crs(due to above mentioned issue),
So i.e leading to populate invalid input compression ratio in
encoder usecase.

Change-Id: I4507b343bee8eec7252cf946ad8d3120efd7bacb
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
此提交包含在:
Govindaraj Rajagopal
2022-06-16 19:27:20 +05:30
父節點 a753289adb
當前提交 e433d223a6
共有 7 個檔案被更改,包括 9 行新增9 行删除

查看文件

@@ -349,7 +349,7 @@ int msm_vidc_deinit_platform(struct platform_device *pdev)
int msm_vidc_init_platform(struct platform_device *pdev)
{
int rc = 0;
struct msm_vidc_platform *platform;
struct msm_vidc_platform *platform = NULL;
struct msm_vidc_core *core;
if (!pdev) {