From: Vito Caputo <vcaputo@pengaru.com>
Date: Wed, 9 Oct 2019 20:43:47 -0700
Subject: af_unix: __unix_find_socket_byname() cleanup
Patch-mainline: v5.5-rc1
Git-commit: 262ce0af81616b4be520ea7050ec1e31b80b5ab1
References: bsc#1154353
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>
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
net/unix/af_unix.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -284,11 +284,9 @@ static struct sock *__unix_find_socket_b
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,