summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdulla Anam <abdullahanam@codeaurora.org>2016-05-05 02:46:29 +0530
committerKyle Yan <kyan@codeaurora.org>2016-06-29 15:01:40 -0700
commit9a3382024f60947b407d01fd0100faca503f5bee (patch)
tree5769abafbcb4d722701530dfc394d8f323e0a431
parented6ef4b17077950c6136f7af0d4c8daf236e1993 (diff)
msm: vidc: Communicate session error to client if aborted.
msm_comm_kill_session is called in driver only in situations where the driver state goes bad. session_abort is called on firmware which may be honored. But still the session_error needs to be communicated to the client or else client will operate oblivious about the bad video driver state. Change-Id: Iafb90cde31a985bf5377fdcdd1a9653a965c5600 Signed-off-by: Abdulla Anam <abdullahanam@codeaurora.org>
-rw-r--r--drivers/media/platform/msm/vidc/msm_vidc_common.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/media/platform/msm/vidc/msm_vidc_common.c b/drivers/media/platform/msm/vidc/msm_vidc_common.c
index c3565bbd973c..9565c28ca008 100644
--- a/drivers/media/platform/msm/vidc/msm_vidc_common.c
+++ b/drivers/media/platform/msm/vidc/msm_vidc_common.c
@@ -4952,14 +4952,12 @@ int msm_comm_kill_session(struct msm_vidc_inst *inst)
if ((inst->state >= MSM_VIDC_OPEN_DONE &&
inst->state < MSM_VIDC_CLOSE_DONE) ||
inst->state == MSM_VIDC_CORE_INVALID) {
- rc = msm_comm_session_abort(inst);
- if (rc == -EBUSY) {
+ if (msm_comm_session_abort(inst)) {
msm_comm_generate_sys_error(inst);
return 0;
- } else if (rc)
- return rc;
-
+ }
change_inst_state(inst, MSM_VIDC_CLOSE_DONE);
+ msm_comm_generate_session_error(inst);
} else {
dprintk(VIDC_WARN,
"Inactive session %p, triggering an internal session error\n",