names: simplify code in kdbus_cmd_name_acquire()
authorDaniel Mack <daniel@zonque.org>
Mon, 6 Oct 2014 12:41:35 +0000 (14:41 +0200)
committerDaniel Mack <daniel@zonque.org>
Mon, 6 Oct 2014 12:41:35 +0000 (14:41 +0200)
There's no need to flush notifications after
kdbus_ep_policy_check_own_access(). Hence, we can get rid of the
jump label.

Signed-off-by: Daniel Mack <daniel@zonque.org>
names.c

diff --git a/names.c b/names.c
index d88ef5f8ad1a749419129b898424a5a519db776b..91849e35f42f88de293eacb8329cc978a10cbec4 100644 (file)
--- a/names.c
+++ b/names.c
@@ -652,12 +652,11 @@ int kdbus_cmd_name_acquire(struct kdbus_name_registry *reg,
 
        ret = kdbus_ep_policy_check_own_access(conn->ep, conn, name);
        if (ret < 0)
-               goto exit;
+               return ret;
 
        ret = kdbus_name_acquire(reg, conn, name, &cmd->flags, &e);
-
-exit:
        kdbus_notify_flush(conn->bus);
+
        return ret;
 }