From 39d9f83d2099453fc6e9c35825209e3c96657d2c Mon Sep 17 00:00:00 2001 From: Ashok Vuyyuru Date: Wed, 3 Jul 2019 20:48:28 +0530 Subject: [PATCH] msm: ipa4: Don't decrease channel ref conunt for GCI channel Because of decreasing channel reference count two times one channel ref count value going to negetive value and failed to deallocate this event ring. Add changes to avoid decreasing the reference count for GCI channel. Change-Id: Id85d476cb9ccf138dc3e5979395ce853d53dd317 Signed-off-by: Arnav Sharma --- gsi/gsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gsi/gsi.c b/gsi/gsi.c index d8f077cb3631..22b955481ae2 100644 --- a/gsi/gsi.c +++ b/gsi/gsi.c @@ -3147,7 +3147,7 @@ int gsi_dealloc_channel(unsigned long chan_hdl) } devm_kfree(gsi_ctx->dev, ctx->user_data); ctx->allocated = false; - if (ctx->evtr) + if (ctx->evtr && (ctx->props.prot != GSI_CHAN_PROT_GCI)) atomic_dec(&ctx->evtr->chan_ref_cnt); atomic_dec(&gsi_ctx->num_chan);