diff options
author | Kuniyuki Iwashima <kuniyu@amazon.com> | 2022-10-20 00:36:03 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-10-24 10:40:39 +0200 |
commit | b45a337f061e131bd01b6df2d89f1228d4350a85 (patch) | |
tree | e4be7dced15359adc7c6a00b3890d9ae0e7a4b0f /net/ipv6 | |
parent | inet6: Remove inet6_destroy_sock(). (diff) | |
download | linux-b45a337f061e131bd01b6df2d89f1228d4350a85.tar.xz linux-b45a337f061e131bd01b6df2d89f1228d4350a85.zip |
inet6: Clean up failure path in do_ipv6_setsockopt().
We can reuse the unlock label above and need not repeat the same code.
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/ipv6_sockglue.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index 532f4478c884..9ce51680290b 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c @@ -1005,10 +1005,8 @@ unlock: return retv; e_inval: - sockopt_release_sock(sk); - if (needs_rtnl) - rtnl_unlock(); - return -EINVAL; + retv = -EINVAL; + goto unlock; } int ipv6_setsockopt(struct sock *sk, int level, int optname, sockptr_t optval, |