aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-01-13 08:46:08 -0500
committerDavid S. Miller <davem@davemloft.net>2014-01-14 21:18:22 -0500
commit0e864b21e5080bc3f178a4729bc4f7bca77188bc (patch)
tree41d8a3e04e9e2e496ed49ade3f0344985e001ba7
parent963a185539a789cdfda7ee9e501be92235a22680 (diff)
sctp: remove a redundant NULL check
It confuses Smatch when we check "sinit" for NULL and then non-NULL and that causes a false positive warning later. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/sctp/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 7cc62b922f12..6b20a15678f6 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -1743,7 +1743,7 @@ static int sctp_sendmsg(struct kiocb *iocb, struct sock *sk,
1743 * either the default or the user specified stream counts. 1743 * either the default or the user specified stream counts.
1744 */ 1744 */
1745 if (sinfo) { 1745 if (sinfo) {
1746 if (!sinit || (sinit && !sinit->sinit_num_ostreams)) { 1746 if (!sinit || !sinit->sinit_num_ostreams) {
1747 /* Check against the defaults. */ 1747 /* Check against the defaults. */
1748 if (sinfo->sinfo_stream >= 1748 if (sinfo->sinfo_stream >=
1749 sp->initmsg.sinit_num_ostreams) { 1749 sp->initmsg.sinit_num_ostreams) {