Merge "msm: camera: icp: Unlock mutex in case of ICP packet failure" into camera-kernel.lnx.7.0

This commit is contained in:
Wasim Khan
2024-02-12 04:17:44 -08:00
committed by Gerrit - the friendly Code Review server

View File

@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only // SPDX-License-Identifier: GPL-2.0-only
/* /*
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved. * 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> #include <linux/uaccess.h>
@@ -6181,8 +6181,10 @@ static int cam_icp_mgr_prepare_hw_update(void *hw_mgr_priv,
packet = prepare_args->packet; 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; return -EINVAL;
}
rc = cam_icp_mgr_pkt_validation(ctx_data, packet); rc = cam_icp_mgr_pkt_validation(ctx_data, packet);
if (rc) { if (rc) {