sctp: remove dup code in net/sctp/socket.c
authorWei Yongjun <yjwei@cn.fujitsu.com>
Mon, 2 Mar 2009 09:46:11 +0000 (09:46 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Mar 2009 06:49:16 +0000 (22:49 -0800)
Remove dup check of "if (optlen < sizeof(int))".

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/socket.c

index dea864f5de54cd1fab32036ad4e89350f6e32a12..4bc558c19fcfc84c211c99bc4dff21bc963f9f01 100644 (file)
@@ -3069,9 +3069,6 @@ static int sctp_setsockopt_maxburst(struct sock *sk,
        int val;
        int assoc_id = 0;
 
-       if (optlen < sizeof(int))
-               return -EINVAL;
-
        if (optlen == sizeof(int)) {
                printk(KERN_WARNING
                   "SCTP: Use of int in max_burst socket option deprecated\n");
@@ -5283,9 +5280,6 @@ static int sctp_getsockopt_maxburst(struct sock *sk, int len,
        struct sctp_sock *sp;
        struct sctp_association *asoc;
 
-       if (len < sizeof(int))
-               return -EINVAL;
-
        if (len == sizeof(int)) {
                printk(KERN_WARNING
                   "SCTP: Use of int in max_burst socket option deprecated\n");