Unlock the "rv_interface_lock" mutex before returning.
Link: https://lkml.kernel.org/r/YuvYzNfGMgV+PIhd@kili
Fixes: ec7fbb75a74c ("rv: Add runtime reactors interface")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
int rv_unregister_reactor(struct rv_reactor *reactor)
{
struct rv_reactor_def *ptr, *next;
+ int ret = 0;
mutex_lock(&rv_interface_lock);
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;
}
/*