Skip to content

Commit f1a15b9

Browse files
Dan Carpenterrostedt
authored andcommitted
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: 04acadc ("rv: Add runtime reactors interface") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent 09794a5 commit f1a15b9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

kernel/trace/rv/rv_reactors.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ int rv_register_reactor(struct rv_reactor *reactor)
329329
int rv_unregister_reactor(struct rv_reactor *reactor)
330330
{
331331
struct rv_reactor_def *ptr, *next;
332+
int ret = 0;
332333

333334
mutex_lock(&rv_interface_lock);
334335

@@ -343,13 +344,14 @@ int rv_unregister_reactor(struct rv_reactor *reactor)
343344
ptr->reactor->name, ptr->counter);
344345
printk(KERN_WARNING "rv: the rv_reactor %s cannot be removed\n",
345346
ptr->reactor->name);
346-
return -EBUSY;
347+
ret = -EBUSY;
348+
break;
347349
}
348350
}
349351
}
350352

351353
mutex_unlock(&rv_interface_lock);
352-
return 0;
354+
return ret;
353355
}
354356

355357
/*

0 commit comments

Comments
 (0)