video: driver: Use vzalloc instead of kzalloc
kzalloc might fail to allocate physically contiguous memory which may not be available always and hence use vzalloc to allocate virtually contiguous memory Change-Id: I8ad89ef107da301217f3d1ec307b9b27b4edd2de Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
这个提交包含在:
@@ -342,7 +342,7 @@ int msm_vidc_deinit_platform(struct platform_device *pdev)
|
||||
msm_vidc_deinit_vpu(core, &pdev->dev);
|
||||
msm_vidc_deinit_platform_variant(core, &pdev->dev);
|
||||
|
||||
kfree(core->platform);
|
||||
msm_vidc_vmem_free((void **)&core->platform);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -366,9 +366,10 @@ int msm_vidc_init_platform(struct platform_device *pdev)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
platform = kzalloc(sizeof(struct msm_vidc_platform), GFP_KERNEL);
|
||||
if (!platform)
|
||||
return -ENOMEM;
|
||||
rc = msm_vidc_vmem_alloc(sizeof(struct msm_vidc_platform),
|
||||
(void **)&platform, __func__);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
core->platform = platform;
|
||||
platform->core = core;
|
||||
|
在新工单中引用
屏蔽一个用户