From: Joe Perches Date: Thu, 12 May 2011 09:19:10 +0000 (+0000) Subject: sctp: sctp_sendmsg: Don't test known non-null sinfo X-Git-Tag: MMI-PSA29.97-13-9~19691^2~104^2~16 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=afd7614c00e364f8f1327e73ad291b02f6d4d1a6;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git sctp: sctp_sendmsg: Don't test known non-null sinfo It's already known non-null above. Signed-off-by: Joe Perches Signed-off-by: David S. Miller --- 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, 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);