diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2019-04-06 07:33:38 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-04-06 07:33:39 -0700 |
commit | e47a761d21f6b75faa980bf4d5a74f7c2df051bd (patch) | |
tree | 6037d5e072da40afc72076380f7c68add4af0e50 | |
parent | bb4a2209cd2799058703c178313f82d4bfc4367e (diff) | |
parent | a70878d7ef53601c888523eb9dd7a7c0e3d6a297 (diff) |
Merge "msm: camera: reqmgr: Hold device lock while retrieving session info" into kernel.lnx.4.9.r11-relLA.UM.7.3.r1-07400-sdm845.0
-rw-r--r-- | drivers/media/platform/msm/camera/cam_req_mgr/cam_req_mgr_core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/platform/msm/camera/cam_req_mgr/cam_req_mgr_core.c b/drivers/media/platform/msm/camera/cam_req_mgr/cam_req_mgr_core.c index 4c4afc1841f8..1295e291ce28 100644 --- a/drivers/media/platform/msm/camera/cam_req_mgr/cam_req_mgr_core.c +++ b/drivers/media/platform/msm/camera/cam_req_mgr/cam_req_mgr_core.c @@ -2432,16 +2432,17 @@ int cam_req_mgr_link(struct cam_req_mgr_link_info *link_info) return -EINVAL; } + mutex_lock(&g_crm_core_dev->crm_lock); + /* session hdl's priv data is cam session struct */ cam_session = (struct cam_req_mgr_core_session *) cam_get_device_priv(link_info->session_hdl); if (!cam_session) { CAM_DBG(CAM_CRM, "NULL pointer"); + mutex_unlock(&g_crm_core_dev->crm_lock); return -EINVAL; } - mutex_lock(&g_crm_core_dev->crm_lock); - /* Allocate link struct and map it with session's request queue */ link = __cam_req_mgr_reserve_link(cam_session); if (!link) { |