msm: camera: icp: Unlock mutex in case of ICP packet failure

Mutex unlock is missing if the packet size is not
equal to the packet header size during ICP packet
validation.
This commit add mutex unlock, which unlocks
the mutex to handle the above scenario.

CRs-Fixed: 3715702
Change-Id: Iafa94c1e6b3ee62cd7fd14ccfeb992c3c5c1c4c4
Signed-off-by: Vikram Sharma <quic_vikramsa@quicinc.com>
此提交包含在:
Vikram Sharma
2024-01-25 13:06:02 +05:30
提交者 Sourabh Soni
父節點 1d217d4df2
當前提交 7ef7162e36

查看文件

@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2024, Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include <linux/uaccess.h>
@@ -6181,8 +6181,10 @@ static int cam_icp_mgr_prepare_hw_update(void *hw_mgr_priv,
packet = prepare_args->packet;
if (cam_packet_util_validate_packet(packet, prepare_args->remain_len))
if (cam_packet_util_validate_packet(packet, prepare_args->remain_len)) {
mutex_unlock(&ctx_data->ctx_mutex);
return -EINVAL;
}
rc = cam_icp_mgr_pkt_validation(ctx_data, packet);
if (rc) {