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

Commit c335e606 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm:camera:lrme: Fix LRME context Ref Count leak"

parents a5627218 be985ae7
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -500,7 +500,12 @@ int cam_context_deinit(struct cam_context *ctx)

void cam_context_putref(struct cam_context *ctx)
{
	if (atomic_read(&(ctx->refcount.refcount)))
		kref_put(&ctx->refcount, cam_node_put_ctxt_to_free_list);
	else
		WARN(1, "ctx %s %d state %d devhdl %X\n", ctx->dev_name,
			ctx->ctx_id, ctx->state, ctx->dev_hdl);

	CAM_DBG(CAM_CORE,
		"ctx device hdl %ld, ref count %d, dev_name %s",
		ctx->dev_hdl, atomic_read(&(ctx->refcount.refcount)),
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -156,7 +156,7 @@ int cam_sync_deregister_callback(sync_callback cb_func,
			"Error: accessing an uninitialized sync obj = %d",
			sync_obj);
		spin_unlock_bh(&sync_dev->row_spinlocks[sync_obj]);
		return -EINVAL;
		return 0;
	}

	CAM_DBG(CAM_SYNC, "deregistered callback for sync object:%d",