From e9fb6cfda64a3e620c7df7bd3b8a48ce735caf5b Mon Sep 17 00:00:00 2001 From: Ravikishore Pampana Date: Thu, 12 Nov 2020 15:32:11 +0530 Subject: [PATCH] msm: camera: reqmgr: Add checks before reporting the error Add the null check for dev parameter before reporting the error on link. Certain corner scenario for flash, send request return native value in that case dev parameter could be null. CRs-Fixed: 2814597 Change-Id: Ibe08f12c2f2c1864c46b17b0ae0f8df5c5648d35 Signed-off-by: Ravikishore Pampana --- drivers/cam_req_mgr/cam_req_mgr_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/cam_req_mgr/cam_req_mgr_core.c b/drivers/cam_req_mgr/cam_req_mgr_core.c index fdbd9565ab49..8a904c025af6 100644 --- a/drivers/cam_req_mgr/cam_req_mgr_core.c +++ b/drivers/cam_req_mgr/cam_req_mgr_core.c @@ -1632,7 +1632,7 @@ static int __cam_req_mgr_process_req(struct cam_req_mgr_core_link *link, struct cam_req_mgr_slot *slot = NULL; struct cam_req_mgr_req_queue *in_q; struct cam_req_mgr_core_session *session; - struct cam_req_mgr_connected_device *dev; + struct cam_req_mgr_connected_device *dev = NULL; struct cam_req_mgr_core_link *tmp_link = NULL; uint32_t max_retry = 0; @@ -1758,7 +1758,7 @@ static int __cam_req_mgr_process_req(struct cam_req_mgr_core_link *link, if (link->max_delay == 1) max_retry++; - if (!link->wq_congestion) { + if (!link->wq_congestion && dev) { link->retry_cnt++; if (link->retry_cnt == max_retry) { CAM_DBG(CAM_CRM,