diff options
Diffstat (limited to 'net/dccp/proto.c')
-rw-r--r-- | net/dccp/proto.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/net/dccp/proto.c b/net/dccp/proto.c index 9c9c08cffdaf..0225bdacd3b1 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c | |||
@@ -452,9 +452,8 @@ out_free_val: | |||
452 | static int do_dccp_setsockopt(struct sock *sk, int level, int optname, | 452 | static int do_dccp_setsockopt(struct sock *sk, int level, int optname, |
453 | char __user *optval, int optlen) | 453 | char __user *optval, int optlen) |
454 | { | 454 | { |
455 | struct dccp_sock *dp; | 455 | struct dccp_sock *dp = dccp_sk(sk); |
456 | int err; | 456 | int val, err = 0; |
457 | int val; | ||
458 | 457 | ||
459 | if (optlen < sizeof(int)) | 458 | if (optlen < sizeof(int)) |
460 | return -EINVAL; | 459 | return -EINVAL; |
@@ -466,9 +465,6 @@ static int do_dccp_setsockopt(struct sock *sk, int level, int optname, | |||
466 | return dccp_setsockopt_service(sk, val, optval, optlen); | 465 | return dccp_setsockopt_service(sk, val, optval, optlen); |
467 | 466 | ||
468 | lock_sock(sk); | 467 | lock_sock(sk); |
469 | dp = dccp_sk(sk); | ||
470 | err = 0; | ||
471 | |||
472 | switch (optname) { | 468 | switch (optname) { |
473 | case DCCP_SOCKOPT_PACKET_SIZE: | 469 | case DCCP_SOCKOPT_PACKET_SIZE: |
474 | dp->dccps_packet_size = val; | 470 | dp->dccps_packet_size = val; |