Delete hil proc in remoteproc only
[processor-sdk/open-amp.git] / lib / remoteproc / remoteproc.c
index 406532214b1f20766fe469e368a8fc352f4c2eb2..ced4eef662e170e032c79123c992a8b0de4ad131 100644 (file)
@@ -131,6 +131,10 @@ int remoteproc_resource_deinit(struct remote_proc *rproc)
                if (rproc->rdev) {
                        rpmsg_deinit(rproc->rdev);
                }
                if (rproc->rdev) {
                        rpmsg_deinit(rproc->rdev);
                }
+               if (rproc->proc) {
+                       hil_delete_proc(rproc->proc);
+                       rproc->proc = NULL;
+               }
                metal_free_memory(rproc);
        }
 
                metal_free_memory(rproc);
        }