diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-01-13 13:46:08 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-15 02:18:22 (GMT) |
commit | 0e864b21e5080bc3f178a4729bc4f7bca77188bc (patch) | |
tree | 41d8a3e04e9e2e496ed49ade3f0344985e001ba7 /net/sctp/socket.c | |
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/socket.c')
-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 7cc62b9..6b20a15 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) { |