tree.h cache-instrumented macros were invalidating NULL pointers in some cases
[keystone-rtos/rm-lld.git] / src / rm.c
index 6caf08b85a7abbfffbf3dad0d7b9e353aa468853..d95d87eca17d4eeb22025b3032c2f57351cbafa5 100644 (file)
--- a/src/rm.c
+++ b/src/rm.c
@@ -1691,7 +1691,7 @@ Rm_Handle Rm_init(const Rm_InitCfg *initCfg, int32_t *result)
         goto errorExit;
     }
 
-    if (initCfg->instType == Rm_instType_SHARED_SERVER) {
+    if (rmInst->instType == Rm_instType_SHARED_SERVER) {
         /* Writeback instance and trees for other cores */
         rmPolicyValidInstTreeWb(rmInst->validInstTree);
         rmAllocatorTreeWb(rmInst->allocatorTree);
@@ -1701,7 +1701,7 @@ Rm_Handle Rm_init(const Rm_InitCfg *initCfg, int32_t *result)
         /* Create the instance's task blocking mechanism */
         rmInst->blockHandle = Rm_osalTaskBlockCreate();
     }
-    /* else: fall through */
+    /* else: just return handle */
 
     return((Rm_Handle)rmInst);