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>
This commit is contained in:
Kuniyuki Iwashima 2022-10-19 15:36:03 -07:00 committed by David S. Miller
parent 1f8c4eeb94
commit b45a337f06
1 changed files with 2 additions and 4 deletions

View File

@ -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,