Skip to content

Commit

Permalink
af_unix: __unix_find_socket_byname() cleanup
Browse files Browse the repository at this point in the history
Remove pointless return variable dance.

Appears vestigial from when the function did locking as seen in
unix_find_socket_byinode(), but locking is handled in
unix_find_socket_byname() for __unix_find_socket_byname().

Signed-off-by: Vito Caputo <vcaputo@pengaru.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Vito Caputo authored and David S. Miller committed Oct 12, 2019
1 parent e001d28 commit 262ce0a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions net/unix/af_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,11 +284,9 @@ static struct sock *__unix_find_socket_byname(struct net *net,

if (u->addr->len == len &&
!memcmp(u->addr->name, sunname, len))
goto found;
return s;
}
s = NULL;
found:
return s;
return NULL;
}

static inline struct sock *unix_find_socket_byname(struct net *net,
Expand Down

0 comments on commit 262ce0a

Please sign in to comment.