Skip to content

Commit

Permalink
tipc: Let tipc_release() return 0
Browse files Browse the repository at this point in the history
net/tipc/socket.c: In function ‘tipc_release’:
net/tipc/socket.c:352: warning: ‘res’ is used uninitialized in this function

Introduced by commit 24be34b ("tipc:
eliminate upcall function pointers between port and socket"), which
removed the sole initializer of "res".

Just return 0 to fix it.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Geert Uytterhoeven authored and David S. Miller committed Apr 7, 2014
1 parent 39d7f32 commit 065d7e3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/tipc/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@ static int tipc_release(struct socket *sock)
struct tipc_sock *tsk;
struct tipc_port *port;
struct sk_buff *buf;
int res;

/*
* Exit if socket isn't fully initialized (occurs when a failed accept()
Expand Down Expand Up @@ -349,7 +348,7 @@ static int tipc_release(struct socket *sock)
sock_put(sk);
sock->sk = NULL;

return res;
return 0;
}

/**
Expand Down

0 comments on commit 065d7e3

Please sign in to comment.