summaryrefslogtreecommitdiffstats
path: root/net/sctp/socket.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-07-19 09:22:28 +0200
committerDavid S. Miller <davem@davemloft.net>2020-07-20 03:26:44 +0200
commit6c8983a606622b61a429830091fdfe643328b96a (patch)
tree5777c2bb4290c44013dabc658d1e43e890a80f5a /net/sctp/socket.c
parentsctp: pass a kernel pointer to sctp_setsockopt_pf_expose (diff)
downloadlinux-6c8983a606622b61a429830091fdfe643328b96a.tar.xz
linux-6c8983a606622b61a429830091fdfe643328b96a.zip
sctp: remove the out_nounlock label in sctp_setsockopt
This is just used once, and a direct return for the redirect to the AF case is much easier to follow than jumping to the end of a very long function. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r--net/sctp/socket.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index f2d4f8a0c426..9a767f359718 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -4444,8 +4444,8 @@ static int sctp_setsockopt(struct sock *sk, int level, int optname,
*/
if (level != SOL_SCTP) {
struct sctp_af *af = sctp_sk(sk)->pf->af;
- retval = af->setsockopt(sk, level, optname, optval, optlen);
- goto out_nounlock;
+
+ return af->setsockopt(sk, level, optname, optval, optlen);
}
if (optlen > 0) {
@@ -4635,8 +4635,6 @@ static int sctp_setsockopt(struct sock *sk, int level, int optname,
release_sock(sk);
kfree(kopt);
-
-out_nounlock:
return retval;
}