From 95aed7d5807b68e5ab3d2feccdcded613763ea49 Mon Sep 17 00:00:00 2001 From: Tharun Kumar Merugu Date: Fri, 1 Nov 2019 16:13:42 +0530 Subject: [PATCH] msm: adsprpc: Remove remote mappings after PD is up Currently before staticPD on QDSP is up, remote mappings are being removed. Instead, remove the mappings after staticPD is up. Change-Id: I10a37b4c840dbd830f7b8897aabbf8681329b74c Acked-by: Vishnu Karthik D Signed-off-by: Tharun Kumar Merugu --- drivers/char/adsprpc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/char/adsprpc.c b/drivers/char/adsprpc.c index 638f2784ef12..89ea4be641b8 100644 --- a/drivers/char/adsprpc.c +++ b/drivers/char/adsprpc.c @@ -3132,6 +3132,11 @@ static int fastrpc_mmap_remove_pdr(struct fastrpc_file *fl) VERIFY(err, cid == fl->cid); if (err) goto bail; + if (!me->channel[fl->cid].spd[session].ispdup && + me->channel[fl->cid].spd[session].pdrhandle) { + err = -ENOTCONN; + goto bail; + } if (me->channel[fl->cid].spd[session].pdrcount != me->channel[fl->cid].spd[session].prevpdrcount) { err = fastrpc_mmap_remove_ssr(fl); @@ -3141,11 +3146,6 @@ static int fastrpc_mmap_remove_pdr(struct fastrpc_file *fl) me->channel[fl->cid].spd[session].prevpdrcount = me->channel[fl->cid].spd[session].pdrcount; } - if (!me->channel[fl->cid].spd[session].ispdup && - me->channel[fl->cid].spd[session].pdrhandle) { - err = -ENOTCONN; - goto bail; - } bail: return err; }