From 8c91109b74c7c4dee048cc4b901a842b1a2a1f1d Mon Sep 17 00:00:00 2001 From: Venkat Chinta Date: Wed, 11 Sep 2019 15:00:07 -0700 Subject: [PATCH] msm: camera: core: Change return type Return different error number when new requests and update packets are rejected due to bad request ID. This allows userspace to differentiate this specific reason for failure. CRs-Fixed: 2518451 Change-Id: I0400c6f2b2e0baf99bee4b4a3736bb1eab646627 Signed-off-by: Venkat Chinta --- drivers/cam_isp/cam_isp_context.c | 2 +- drivers/cam_req_mgr/cam_req_mgr_core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/cam_isp/cam_isp_context.c b/drivers/cam_isp/cam_isp_context.c index 2a3c6dbfcc618..088ba4d1b5045 100644 --- a/drivers/cam_isp/cam_isp_context.c +++ b/drivers/cam_isp/cam_isp_context.c @@ -2920,7 +2920,7 @@ static int __cam_isp_ctx_config_dev_in_top_state( CAM_INFO(CAM_ISP, "request %lld has been flushed, reject packet", packet->header.request_id); - rc = -EINVAL; + rc = -EBADR; goto free_req; } diff --git a/drivers/cam_req_mgr/cam_req_mgr_core.c b/drivers/cam_req_mgr/cam_req_mgr_core.c index 97e1dce27f8d8..4ca666beab0e5 100644 --- a/drivers/cam_req_mgr/cam_req_mgr_core.c +++ b/drivers/cam_req_mgr/cam_req_mgr_core.c @@ -3209,7 +3209,7 @@ int cam_req_mgr_schedule_request( CAM_INFO(CAM_CRM, "request %lld is flushed, last_flush_id to flush %d", sched_req->req_id, link->last_flush_id); - rc = -EINVAL; + rc = -EBADR; goto end; }