video: driver: skip zero length internal buffers allocation

Few internal buffers size can be zero based on configuration
(such as BIN buffers size is zero for interlace bitstream)
and hence skip allocation instead of returning error.

Change-Id: Id157115d8d6eb3f64154f3b18ec3843f289164ef
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
This commit is contained in:
Maheshwar Ajja
2021-03-31 18:35:46 -07:00
父節點 bc24301695
當前提交 10ac73594f

查看文件

@@ -2403,11 +2403,9 @@ int msm_vidc_create_internal_buffer(struct msm_vidc_inst *inst,
if (!mappings)
return -EINVAL;
if (!buffers->size) {
i_vpr_e(inst, "%s: invalid buffer %#x\n",
__func__, buffer_type);
return -EINVAL;
}
if (!buffers->size)
return 0;
buffer = kzalloc(sizeof(struct msm_vidc_buffer), GFP_KERNEL);
if (!buffer) {
i_vpr_e(inst, "%s: buf alloc failed\n", __func__);