sctp: sctp_sendmsg: Don't test known non-null sinfo
Joe Perches [Thu, 12 May 2011 09:19:10 +0000 (09:19 +0000)]
It's already known non-null above.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

net/sctp/socket.c

index d4b8db1..6766913 100644 (file)
@@ -1791,12 +1791,10 @@ SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct sock *sk,
                goto out_free;
        }
 
-       if (sinfo) {
-               /* Check for invalid stream. */
-               if (sinfo->sinfo_stream >= asoc->c.sinit_num_ostreams) {
-                       err = -EINVAL;
-                       goto out_free;
-               }
+       /* Check for invalid stream. */
+       if (sinfo->sinfo_stream >= asoc->c.sinit_num_ostreams) {
+               err = -EINVAL;
+               goto out_free;
        }
 
        timeo = sock_sndtimeo(sk, msg->msg_flags & MSG_DONTWAIT);