Commit 38a13df9 authored by Suman Anna's avatar Suman Anna Committed by Hari Kanigeri

SYSLINK: ipc - minor fixes in sharedregion and gatepeterson driver

This patch provides fixes for minor bugs in gatepeterson driver
and sharedregion modules. gatepeterson driver has an incorrect
parameter check. Error traces are slightly adjusted in the
sharedregion module. Double semi-colons are corrected.
Signed-off-by: default avatarSuman Anna <s-anna@ti.com>
parent 1d517d54
......@@ -392,7 +392,7 @@ obj_alloc_fail:
handle_alloc_fail: /* Fall through */
exit:
printk(KERN_ERR "gatepeterson_create failed status: %x\n", retval);
return NULL;;
return NULL;
}
EXPORT_SYMBOL(gatepeterson_create);
......@@ -845,7 +845,7 @@ void gatepeterson_leave(void *gphandle, u32 flag)
BUG_ON(gatepeterson_state.is_init != true);
BUG_ON(gphandle == NULL);
handle = (struct gatepeterson_object *)gphandle;;
handle = (struct gatepeterson_object *)gphandle;
(void) flag;
obj = (struct gatepeterson_obj *)handle->obj;
obj->nested--;
......
......@@ -190,7 +190,7 @@ static int gatepeterson_ioctl_open(struct gatepeterson_cmd_args *cargs)
if (cargs->args.open.name_len > 0) {
params.name = kmalloc(cargs->args.open.name_len + 1,
GFP_KERNEL);
if (params.name != NULL) {
if (params.name == NULL) {
status = -ENOMEM;
goto exit;
}
......
......@@ -315,7 +315,7 @@ int sharedregion_get_index(void *addr)
bool found = false;
u32 i;
u16 myproc_id;
s32 retval = 0;
s32 retval = 0;
if (WARN_ON(sharedregion_state.table == NULL)) {
retval = -ENODEV;
......@@ -324,8 +324,10 @@ int sharedregion_get_index(void *addr)
myproc_id = multiproc_get_id(NULL);
retval = mutex_lock_interruptible(sharedregion_state.gate_handle);
if (retval)
if (retval) {
retval = -ENODEV;
goto exit;
}
table = sharedregion_state.table;
for (i = 0; i < sharedregion_state.cfg.max_regions; i++) {
......@@ -345,9 +347,10 @@ int sharedregion_get_index(void *addr)
retval = -ENOENT; /* No entry found in the table */
mutex_unlock(sharedregion_state.gate_handle);
return retval;
exit:
printk(KERN_ERR "sharedregion_get_index failed status:%x\n", retval);
printk(KERN_ERR "sharedregion_get_index failed index:%x\n", retval);
return retval;
}
EXPORT_SYMBOL(sharedregion_get_index);
......
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