提交 afd7614c 编写于 作者: J Joe Perches 提交者: David S. Miller

sctp: sctp_sendmsg: Don't test known non-null sinfo

It's already known non-null above.
Signed-off-by: NJoe Perches <joe@perches.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 517aa0bc
...@@ -1791,12 +1791,10 @@ SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct sock *sk, ...@@ -1791,12 +1791,10 @@ SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct sock *sk,
goto out_free; goto out_free;
} }
if (sinfo) { /* Check for invalid stream. */
/* Check for invalid stream. */ if (sinfo->sinfo_stream >= asoc->c.sinit_num_ostreams) {
if (sinfo->sinfo_stream >= asoc->c.sinit_num_ostreams) { err = -EINVAL;
err = -EINVAL; goto out_free;
goto out_free;
}
} }
timeo = sock_sndtimeo(sk, msg->msg_flags & MSG_DONTWAIT); timeo = sock_sndtimeo(sk, msg->msg_flags & MSG_DONTWAIT);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册