Merge "msm: camera: reqmgr: check validity of last_applied_idx" into camera-kernel.lnx.5.0

This commit is contained in:
Savita Patted
2021-03-09 20:17:04 -08:00
committed by Gerrit - the friendly Code Review server

View File

@@ -2077,7 +2077,9 @@ static int __cam_req_mgr_process_sof_freeze(void *priv, void *data)
in_q = link->req.in_q;
if (in_q) {
mutex_lock(&link->req.lock);
last_applied_req_id = in_q->slot[in_q->last_applied_idx].req_id;
if (in_q->last_applied_idx >= 0)
last_applied_req_id =
in_q->slot[in_q->last_applied_idx].req_id;
mutex_unlock(&link->req.lock);
}