projects
/
platform
/
core
/
system
/
kdbus-bus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9aad6ea
)
endpoint: save an extra variable for idr_alloc()
author
Daniel Mack
<zonque@gmail.com>
Wed, 18 Dec 2013 00:33:41 +0000
(
01:33
+0100)
committer
Daniel Mack
<zonque@gmail.com>
Wed, 18 Dec 2013 00:33:41 +0000
(
01:33
+0100)
endpoint.c
patch
|
blob
|
history
diff --git
a/endpoint.c
b/endpoint.c
index 64c36781dd42b2c82b9276c3951062230cb892f1..ea5773a5142f99c6f20338c7601a2ba8db1bed28 100644
(file)
--- a/
endpoint.c
+++ b/
endpoint.c
@@
-154,7
+154,6
@@
int kdbus_ep_new(struct kdbus_bus *bus, struct kdbus_ns *ns, const char *name,
{
struct kdbus_ep *e;
int ret;
- int i;
e = kdbus_ep_find(bus, name);
if (e) {
@@
-181,13
+180,12
@@
int kdbus_ep_new(struct kdbus_bus *bus, struct kdbus_ns *ns, const char *name,
mutex_lock(&ns->lock);
/* register minor in our endpoint map */
- i = idr_alloc(&ns->idr, e, 1, 0, GFP_KERNEL);
- if (i <= 0) {
- ret = i;
+ ret = idr_alloc(&ns->idr, e, 1, 0, GFP_KERNEL);
+ if (ret <= 0) {
mutex_unlock(&ns->lock);
goto exit;
}
- e->minor =
i
;
+ e->minor =
ret
;
mutex_unlock(&ns->lock);
/* register bus endpoint device */