Commit 25456792 authored by Suman Anna's avatar Suman Anna Committed by Hari Kanigeri

SYSLINK: ipc - conditional check added before printing some traces

Failed statements are printed in the IPC module xxx_destroy() functions
only after checking if the status value indicates an error condition. This
is to avoid confusion by the existing trace statement word 'failed'. This
statement was being printed if the xxx_destroy jumps to exit label because
the module's reference count is not yet zero.
Signed-off-by: default avatarSuman Anna <s-anna@ti.com>
parent b43b314f
......@@ -287,7 +287,10 @@ int gatepeterson_destroy(void)
return 0;
exit:;
printk(KERN_ERR "gatepeterson_destroy failed status:%x\n", retval);
if (retval < 0) {
printk(KERN_ERR "gatepeterson_destroy failed status:%x\n",
retval);
}
return retval;
}
......
......@@ -315,7 +315,10 @@ int nameserver_destroy(void)
return 0;
exit:
printk(KERN_ERR "nameserver_destroy failed, retval: %x\n", retval);
if (retval < 0) {
printk(KERN_ERR "nameserver_destroy failed, retval: %x\n",
retval);
}
return retval;
}
EXPORT_SYMBOL(nameserver_destroy);
......
......@@ -202,7 +202,10 @@ int sharedregion_destroy(void)
return 0;
error:
printk(KERN_ERR "sharedregion_destroy failed status:%x\n", retval);
if (retval < 0) {
printk(KERN_ERR "sharedregion_destroy failed status:%x\n",
retval);
}
return retval;
}
EXPORT_SYMBOL(sharedregion_destroy);
......@@ -300,10 +303,13 @@ success:
dup_entry_error: /* Fall through */
mem_overlap_error:
printk(KERN_WARNING "sharedregion_add entry exists status: %x\n",
retval);
mutex_unlock(sharedregion_state.gate_handle);
error:
printk(KERN_ERR "sharedregion_add failed status:%x\n", retval);
if (retval < 0)
printk(KERN_ERR "sharedregion_add failed status:%x\n", retval);
return retval;
}
EXPORT_SYMBOL(sharedregion_add);
......
......@@ -584,7 +584,7 @@ s32 sysmgr_destroy(void)
!= SYSMGR_MAKE_MAGICSTAMP(0)) {
status = 1;
goto exit;
}
}
/* Finalize Platform module*/
if (sysmgr_state.platform_init_flag == true) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment