From 4024c080239bf94b95938538d19a49908a0967c4 Mon Sep 17 00:00:00 2001 From: nishant chaubey Date: Fri, 17 Feb 2023 11:13:43 +0530 Subject: [PATCH] msm: adsprpc: cleanup ADSP rh memory during hibernation During hibernation suspend, we pass null fl, allow ADSP remoteheap memory cleanup in this case. Change-Id: I42b80ded3955f9d5200cb77114a476a69f5353d5 Signed-off-by: nishant chaubey --- dsp/adsprpc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dsp/adsprpc.c b/dsp/adsprpc.c index 310e3e6433..f53ef340f3 100644 --- a/dsp/adsprpc.c +++ b/dsp/adsprpc.c @@ -4728,8 +4728,9 @@ static int fastrpc_mmap_remove_ssr(struct fastrpc_file *fl, int locked) match = NULL; spin_lock_irqsave(&me->hlock, irq_flags); hlist_for_each_entry_safe(map, n, &me->maps, hn) { - if (map->servloc_name && fl && - fl->servloc_name && !strcmp(map->servloc_name, fl->servloc_name)) { + /* In hibernation suspend case fl is NULL, check !fl to cleanup */ + if (!fl || (fl && map->servloc_name && fl->servloc_name + && !strcmp(map->servloc_name, fl->servloc_name))) { match = map; if (map->is_persistent && map->in_use) { int destVM[1] = {VMID_HLOS};