Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aea54c3c authored by Maheshwar Ajja's avatar Maheshwar Ajja
Browse files

msm: vidc: avoid repeated calls to handle_sys_error



There is no need to call handle_sys_error if it is
called already. So check the core state to return
if it is not in valid state.

CRs-Fixed: 1072500

Change-Id: Iaa77ea31f29190dcf35b4bfc4913b8eec0d638b0
Signed-off-by: default avatarMaheshwar Ajja <majja@codeaurora.org>
parent e2787f51
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -1636,6 +1636,17 @@ static void handle_sys_error(enum hal_command_response cmd, void *data)
		return;
	}

	mutex_lock(&core->lock);
	if (core->state == VIDC_CORE_INVALID ||
		core->state == VIDC_CORE_UNINIT) {
		dprintk(VIDC_ERR,
			"%s: Core already moved to state %d\n",
			 __func__, core->state);
		mutex_unlock(&core->lock);
		return;
	}
	mutex_unlock(&core->lock);

	dprintk(VIDC_WARN, "SYS_ERROR %d received for core %pK\n", cmd, core);
	msm_comm_clean_notify_client(core);