diff options
author | Joe Perches <joe@perches.com> | 2011-05-12 05:19:10 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-12 17:30:50 -0400 |
commit | afd7614c00e364f8f1327e73ad291b02f6d4d1a6 (patch) | |
tree | 67a49abb1a0efa9544ae3a328f1eafe34436799b /net/sctp/socket.c | |
parent | 517aa0bcda9b092a4c3fab7bf93f0cebe372ece0 (diff) |
sctp: sctp_sendmsg: Don't test known non-null sinfo
It's already known non-null above.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r-- | net/sctp/socket.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index d4b8db177e27..6766913a53e6 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -1791,12 +1791,10 @@ SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct sock *sk, | |||
1791 | goto out_free; | 1791 | goto out_free; |
1792 | } | 1792 | } |
1793 | 1793 | ||
1794 | if (sinfo) { | 1794 | /* Check for invalid stream. */ |
1795 | /* Check for invalid stream. */ | 1795 | if (sinfo->sinfo_stream >= asoc->c.sinit_num_ostreams) { |
1796 | if (sinfo->sinfo_stream >= asoc->c.sinit_num_ostreams) { | 1796 | err = -EINVAL; |
1797 | err = -EINVAL; | 1797 | goto out_free; |
1798 | goto out_free; | ||
1799 | } | ||
1800 | } | 1798 | } |
1801 | 1799 | ||
1802 | timeo = sock_sndtimeo(sk, msg->msg_flags & MSG_DONTWAIT); | 1800 | timeo = sock_sndtimeo(sk, msg->msg_flags & MSG_DONTWAIT); |