Merge "msm: camera: common: Return appropriate error code for cancelled requests" into camera-kernel.lnx.4.0

This commit is contained in:
Camera Software Integration
2020-07-08 12:20:07 -07:00
committed by Gerrit - the friendly Code Review server
commit f4fbab5083
2 muutettua tiedostoa jossa 12 lisäystä ja 3 poistoa

Näytä tiedosto

@@ -2838,8 +2838,17 @@ static int cam_req_mgr_cb_add_req(struct cam_req_mgr_add_request *add_req)
/* Validate if req id is present in input queue */
idx = __cam_req_mgr_find_slot_for_req(link->req.in_q, add_req->req_id);
if (idx < 0) {
CAM_ERR(CAM_CRM, "req %lld not found in in_q", add_req->req_id);
rc = -ENOENT;
if (((uint32_t)add_req->req_id) <= (link->last_flush_id)) {
CAM_ERR(CAM_CRM,
"req %lld not found in in_q; it has been flushed [last_flush_req %u]",
add_req->req_id, link->last_flush_id);
rc = -EBADR;
} else {
CAM_ERR(CAM_CRM,
"req %lld not found in in_q",
add_req->req_id);
rc = -ENOENT;
}
goto end;
}