Loading drivers/media/platform/msm/cvp/hfi_response_handler.c +5 −2 Original line number Diff line number Diff line Loading @@ -426,7 +426,7 @@ static struct msm_cvp_inst *cvp_get_inst_from_id(struct msm_cvp_core *core, } } inst = match ? inst : NULL; inst = match && kref_get_unless_zero(&inst->kref) ? inst : NULL; mutex_unlock(&core->lock); } else { if (core->state == CVP_CORE_UNINIT) Loading Loading @@ -525,7 +525,7 @@ static int hfi_process_session_cvp_msg(u32 device_id, sess_msg = kmem_cache_alloc(cvp_driver->msg_cache, GFP_KERNEL); if (sess_msg == NULL) { dprintk(CVP_ERR, "%s runs out msg cache memory\n", __func__); return -ENOMEM; goto error_no_mem; } memcpy(&sess_msg->pkt, pkt, get_msg_size()); Loading @@ -548,11 +548,14 @@ static int hfi_process_session_cvp_msg(u32 device_id, info->response_type = HAL_NO_RESP; cvp_put_inst(inst); return 0; error_handle_msg: spin_unlock(&inst->session_queue.lock); kmem_cache_free(cvp_driver->msg_cache, sess_msg); error_no_mem: cvp_put_inst(inst); return -ENOMEM; } Loading Loading
drivers/media/platform/msm/cvp/hfi_response_handler.c +5 −2 Original line number Diff line number Diff line Loading @@ -426,7 +426,7 @@ static struct msm_cvp_inst *cvp_get_inst_from_id(struct msm_cvp_core *core, } } inst = match ? inst : NULL; inst = match && kref_get_unless_zero(&inst->kref) ? inst : NULL; mutex_unlock(&core->lock); } else { if (core->state == CVP_CORE_UNINIT) Loading Loading @@ -525,7 +525,7 @@ static int hfi_process_session_cvp_msg(u32 device_id, sess_msg = kmem_cache_alloc(cvp_driver->msg_cache, GFP_KERNEL); if (sess_msg == NULL) { dprintk(CVP_ERR, "%s runs out msg cache memory\n", __func__); return -ENOMEM; goto error_no_mem; } memcpy(&sess_msg->pkt, pkt, get_msg_size()); Loading @@ -548,11 +548,14 @@ static int hfi_process_session_cvp_msg(u32 device_id, info->response_type = HAL_NO_RESP; cvp_put_inst(inst); return 0; error_handle_msg: spin_unlock(&inst->session_queue.lock); kmem_cache_free(cvp_driver->msg_cache, sess_msg); error_no_mem: cvp_put_inst(inst); return -ENOMEM; } Loading