diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-01-13 17:46:08 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-15 06:18:22 +0400 |
commit | 0e864b21e5080bc3f178a4729bc4f7bca77188bc (patch) | |
tree | 41d8a3e04e9e2e496ed49ade3f0344985e001ba7 /net/sctp | |
parent | 963a185539a789cdfda7ee9e501be92235a22680 (diff) | |
download | linux-0e864b21e5080bc3f178a4729bc4f7bca77188bc.tar.xz |
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>
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/socket.c | 2 |
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, * either the default or the user specified stream counts. */ if (sinfo) { - if (!sinit || (sinit && !sinit->sinit_num_ostreams)) { + if (!sinit || !sinit->sinit_num_ostreams) { /* Check against the defaults. */ if (sinfo->sinfo_stream >= sp->initmsg.sinit_num_ostreams) { |