Skip to content

Commit 0e864b2

Browse files
Dan Carpenterdavem330
authored andcommitted
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 <[email protected]> Acked-by: Neil Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 963a185 commit 0e864b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/sctp/socket.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1743,7 +1743,7 @@ static int sctp_sendmsg(struct kiocb *iocb, struct sock *sk,
17431743
* either the default or the user specified stream counts.
17441744
*/
17451745
if (sinfo) {
1746-
if (!sinit || (sinit && !sinit->sinit_num_ostreams)) {
1746+
if (!sinit || !sinit->sinit_num_ostreams) {
17471747
/* Check against the defaults. */
17481748
if (sinfo->sinfo_stream >=
17491749
sp->initmsg.sinit_num_ostreams) {

0 commit comments

Comments
 (0)