Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f1b4255 authored by Gaurav Jindal's avatar Gaurav Jindal Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: icp: Release mutex in error



Release mutex in cam_icp_mgr_prepare_hw_update if
cam_packet_util_validate_packet fails

Change-Id: I9e1381106b8b1f53fb5591e907076085ef8a6d2e
Signed-off-by: default avatarGaurav Jindal <gjindal@codeaurora.org>
parent 663ff1ae
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -4052,8 +4052,12 @@ 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);
		CAM_ERR(CAM_ICP, "ctx id: %u packet req id %lld validate fail",
			ctx_data->ctx_id, packet->header.request_id);
		return -EINVAL;
	}

	rc = cam_icp_mgr_pkt_validation(packet);
	if (rc) {