aboutsummaryrefslogtreecommitdiff
path: root/net/sctp
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-01-13 16:46:08 +0300
committerDavid S. Miller <davem@davemloft.net>2014-01-14 18:18:22 -0800
commit0e864b21e5080bc3f178a4729bc4f7bca77188bc (patch)
tree41d8a3e04e9e2e496ed49ade3f0344985e001ba7 /net/sctp
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>
Diffstat (limited to 'net/sctp')
-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 7cc62b922f1..6b20a15678f 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) {