Commit f1a15b97 authored by Dan Carpenter's avatar Dan Carpenter Committed by Steven Rostedt (Google)

rv: Unlock on error path in rv_unregister_reactor()

Unlock the "rv_interface_lock" mutex before returning.

Link: https://lkml.kernel.org/r/YuvYzNfGMgV+PIhd@kili

Fixes: 04acadcb ("rv: Add runtime reactors interface")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
parent 09794a5a
......@@ -329,6 +329,7 @@ int rv_register_reactor(struct rv_reactor *reactor)
int rv_unregister_reactor(struct rv_reactor *reactor)
{
struct rv_reactor_def *ptr, *next;
int ret = 0;
mutex_lock(&rv_interface_lock);
......@@ -343,13 +344,14 @@ int rv_unregister_reactor(struct rv_reactor *reactor)
ptr->reactor->name, ptr->counter);
printk(KERN_WARNING "rv: the rv_reactor %s cannot be removed\n",
ptr->reactor->name);
return -EBUSY;
ret = -EBUSY;
break;
}
}
}
mutex_unlock(&rv_interface_lock);
return 0;
return ret;
}
/*
......
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