diff mbox

[2/2] sctp: sctp_sendmsg: Don't test known non-null sinfo

Message ID b6372a0ac574e3fd110de57eb3e41d97c73d5423.1305227621.git.joe@perches.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Joe Perches May 12, 2011, 7:19 p.m. UTC
It's already known non-null above.

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/sctp/socket.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

Comments

David Miller May 12, 2011, 9:31 p.m. UTC | #1
From: Joe Perches <joe@perches.com>
Date: Thu, 12 May 2011 12:19:10 -0700

> It's already known non-null above.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index a5d3560..10ebcd7 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -1793,12 +1793,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);