Skip to content

Commit b45a337

Browse files
q2vendavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 1f8c4ee commit b45a337

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

net/ipv6/ipv6_sockglue.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,10 +1005,8 @@ int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
10051005
return retv;
10061006

10071007
e_inval:
1008-
sockopt_release_sock(sk);
1009-
if (needs_rtnl)
1010-
rtnl_unlock();
1011-
return -EINVAL;
1008+
retv = -EINVAL;
1009+
goto unlock;
10121010
}
10131011

10141012
int ipv6_setsockopt(struct sock *sk, int level, int optname, sockptr_t optval,

0 commit comments

Comments
 (0)