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

Commit 25e5c115 authored by Harsh Shah's avatar Harsh Shah
Browse files

msm: camera: isp: Remove recurrent mutex lock call



There is a deadlock resulting from trying to acquire the same
mutex lock in shutdown call. Remove one of the lock acquires
to resolve this.

Change-Id: Id724d5c031b5d56e76a0e3efc50282b4a74b39a5
Signed-off-by: default avatarHarsh Shah <harshs@codeaurora.org>
parent e19fb177
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -44,7 +44,6 @@ int cam_context_shutdown(struct cam_context *ctx)
	int rc = 0;
	struct cam_release_dev_cmd cmd;

	mutex_lock(&ctx->ctx_mutex);
	if (ctx->state > CAM_CTX_AVAILABLE && ctx->state < CAM_CTX_STATE_MAX) {
		cmd.session_handle = ctx->session_hdl;
		cmd.dev_handle = ctx->dev_hdl;
@@ -61,7 +60,6 @@ int cam_context_shutdown(struct cam_context *ctx)
			ctx->dev_name, ctx->ctx_id, ctx->state);
		rc = -EINVAL;
	}
	mutex_unlock(&ctx->ctx_mutex);

	rc = cam_destroy_device_hdl(ctx->dev_hdl);
	if (rc)