From: Dan Carpenter Date: Mon, 13 Jan 2014 13:46:08 +0000 (+0300) Subject: sctp: remove a redundant NULL check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0e864b21e5080bc3f178a4729bc4f7bca77188bc;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Acked-by: Neil Horman Signed-off-by: David S. Miller --- 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) {