lkml.org 
[lkml]   [2015]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 18/44] kdbus: Add var initialization to kdbus_conn_entry_insert()
Date
Assign zero to `ret' in the beginning of function instead of doing it
in the end.

Signed-off-by: Sergei Zviagintsev <sergei@s15v.net>
---
ipc/kdbus/connection.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/ipc/kdbus/connection.c b/ipc/kdbus/connection.c
index 4f3cd370ecd9..185ed3ba1bce 100644
--- a/ipc/kdbus/connection.c
+++ b/ipc/kdbus/connection.c
@@ -889,7 +889,7 @@ int kdbus_conn_entry_insert(struct kdbus_conn *conn_src,
const struct kdbus_name_entry *name)
{
struct kdbus_queue_entry *entry;
- int ret;
+ int ret = 0;

kdbus_conn_lock2(conn_src, conn_dst);

@@ -916,8 +916,6 @@ int kdbus_conn_entry_insert(struct kdbus_conn *conn_src,
kdbus_queue_entry_enqueue(entry, reply);
wake_up_interruptible(&conn_dst->wait);

- ret = 0;
-
exit_unlock:
kdbus_conn_unlock2(conn_src, conn_dst);
return ret;
--
1.8.3.1


\
 
 \ /
  Last update: 2015-10-08 14:01    [W:0.321 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site