From f7ff340deccebf91b73aaee0155c2e0a03af9317 Mon Sep 17 00:00:00 2001 From: dianlujitao Date: Fri, 6 Dec 2024 16:39:21 +0800 Subject: [PATCH] msm: eva: put kref after processing deprecated message Fixes: 681ecf595ad5 ("msm: eva: Adding kref count for cvp_get_inst_from_id") Change-Id: I7b9703ae78420f53e31f94ddb7c53fdfddad789f --- drivers/media/platform/msm/cvp/hfi_response_handler.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/msm/cvp/hfi_response_handler.c b/drivers/media/platform/msm/cvp/hfi_response_handler.c index 5d7d3ae877e9..5447a9624000 100644 --- a/drivers/media/platform/msm/cvp/hfi_response_handler.c +++ b/drivers/media/platform/msm/cvp/hfi_response_handler.c @@ -504,6 +504,7 @@ static int hfi_process_session_cvp_msg(u32 device_id, || pkt->packet_type == HFI_MSG_SESSION_CVP_FD) { u64 ktid; u32 kdata1, kdata2; + int rc; kdata1 = pkt->client_data.kdata1; kdata2 = pkt->client_data.kdata2; @@ -515,8 +516,10 @@ static int hfi_process_session_cvp_msg(u32 device_id, msm_cvp_unmap_buf_cpu(inst, ktid); - return _deprecated_hfi_msg_process(device_id, - pkt, info, inst); + rc = _deprecated_hfi_msg_process(device_id, pkt, info, + inst); + cvp_put_inst(inst); + return rc; } dprintk(CVP_ERR, "Invalid deprecate_bitmask %#x\n", inst->deprecate_bitmask);