Loading drivers/media/platform/msm/vidc/msm_vidc_common.c +15 −12 Original line number Diff line number Diff line Loading @@ -3837,13 +3837,17 @@ int msm_vidc_comm_cmd(void *instance, union msm_v4l2_cmd *cmd) struct eos_buf *binfo = NULL; u32 smem_flags = SMEM_UNCACHED; get_inst(inst->core, inst); if (inst->state != MSM_VIDC_START_DONE) { dprintk(VIDC_DBG, "Inst = %pK is not ready for EOS\n", inst); break; } binfo = kzalloc(sizeof(*binfo), GFP_KERNEL); if (!binfo) { dprintk(VIDC_ERR, "%s: Out of memory\n", __func__); rc = -ENOMEM; goto exit; break; } if (inst->flags & VIDC_SECURE) Loading @@ -3853,26 +3857,25 @@ int msm_vidc_comm_cmd(void *instance, union msm_v4l2_cmd *cmd) SZ_4K, 1, smem_flags, HAL_BUFFER_INPUT, 0, &binfo->smem); if (rc) { kfree(binfo); dprintk(VIDC_ERR, "Failed to allocate output memory\n"); rc = -ENOMEM; goto exit; break; } mutex_lock(&inst->eosbufs.lock); list_add_tail(&binfo->list, &inst->eosbufs.list); mutex_unlock(&inst->eosbufs.lock); if (inst->state != MSM_VIDC_START_DONE) { dprintk(VIDC_DBG, "Inst = %pK is not ready for EOS\n", inst); goto exit; } rc = msm_vidc_send_pending_eos_buffers(inst); exit: put_inst(inst); if (rc) { dprintk(VIDC_ERR, "Failed pending_eos_buffers sending\n"); list_del(&binfo->list); kfree(binfo); break; } break; } default: Loading Loading
drivers/media/platform/msm/vidc/msm_vidc_common.c +15 −12 Original line number Diff line number Diff line Loading @@ -3837,13 +3837,17 @@ int msm_vidc_comm_cmd(void *instance, union msm_v4l2_cmd *cmd) struct eos_buf *binfo = NULL; u32 smem_flags = SMEM_UNCACHED; get_inst(inst->core, inst); if (inst->state != MSM_VIDC_START_DONE) { dprintk(VIDC_DBG, "Inst = %pK is not ready for EOS\n", inst); break; } binfo = kzalloc(sizeof(*binfo), GFP_KERNEL); if (!binfo) { dprintk(VIDC_ERR, "%s: Out of memory\n", __func__); rc = -ENOMEM; goto exit; break; } if (inst->flags & VIDC_SECURE) Loading @@ -3853,26 +3857,25 @@ int msm_vidc_comm_cmd(void *instance, union msm_v4l2_cmd *cmd) SZ_4K, 1, smem_flags, HAL_BUFFER_INPUT, 0, &binfo->smem); if (rc) { kfree(binfo); dprintk(VIDC_ERR, "Failed to allocate output memory\n"); rc = -ENOMEM; goto exit; break; } mutex_lock(&inst->eosbufs.lock); list_add_tail(&binfo->list, &inst->eosbufs.list); mutex_unlock(&inst->eosbufs.lock); if (inst->state != MSM_VIDC_START_DONE) { dprintk(VIDC_DBG, "Inst = %pK is not ready for EOS\n", inst); goto exit; } rc = msm_vidc_send_pending_eos_buffers(inst); exit: put_inst(inst); if (rc) { dprintk(VIDC_ERR, "Failed pending_eos_buffers sending\n"); list_del(&binfo->list); kfree(binfo); break; } break; } default: Loading