Skip to content

Commit 262ce0a

Browse files
vcaputodavem330
authored andcommitted
af_unix: __unix_find_socket_byname() cleanup
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e001d28 commit 262ce0a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

net/unix/af_unix.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,9 @@ static struct sock *__unix_find_socket_byname(struct net *net,
284284

285285
if (u->addr->len == len &&
286286
!memcmp(u->addr->name, sunname, len))
287-
goto found;
287+
return s;
288288
}
289-
s = NULL;
290-
found:
291-
return s;
289+
return NULL;
292290
}
293291

294292
static inline struct sock *unix_find_socket_byname(struct net *net,

0 commit comments

Comments
 (0)