public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle•com>
To: Jon Maloy <jon.maloy@ericsson•com>
Cc: Ying Xue <ying.xue@windriver•com>,
	"David S. Miller" <davem@davemloft•net>,
	netdev@vger•kernel.org, tipc-discussion@lists•sourceforge.net,
	kernel-janitors@vger•kernel.org
Subject: [patch] tipc: remove an unnecessary NULL check
Date: Wed, 27 Apr 2016 11:05:28 +0300	[thread overview]
Message-ID: <20160427080528.GA22469@mwanda> (raw)

This is never called with a NULL "buf" and anyway, we dereference 's' on
the lines before so it would Oops before we reach the check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle•com>

diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c
index 79de588..0dd0224 100644
--- a/net/tipc/subscr.c
+++ b/net/tipc/subscr.c
@@ -326,8 +326,7 @@ static void tipc_subscrb_rcv_cb(struct net *net, int conid,
 		return tipc_subscrp_cancel(s, subscriber);
 	}
 
-	if (s)
-		tipc_subscrp_subscribe(net, s, subscriber, swap);
+	tipc_subscrp_subscribe(net, s, subscriber, swap);
 }
 
 /* Handle one request to establish a new subscriber */

             reply	other threads:[~2016-04-27  8:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-27  8:05 Dan Carpenter [this message]
2016-04-27 10:51 ` [patch] tipc: remove an unnecessary NULL check Xue, Ying
2016-04-28 20:54 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160427080528.GA22469@mwanda \
    --to=dan.carpenter@oracle$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=jon.maloy@ericsson$(echo .)com \
    --cc=kernel-janitors@vger$(echo .)kernel.org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=tipc-discussion@lists$(echo .)sourceforge.net \
    --cc=ying.xue@windriver$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox