public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
* [patch] tipc: remove an unnecessary NULL check
@ 2016-04-27  8:05 Dan Carpenter
  2016-04-27 10:51 ` Xue, Ying
  2016-04-28 20:54 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2016-04-27  8:05 UTC (permalink / raw)
  To: Jon Maloy
  Cc: Ying Xue, David S. Miller, netdev, tipc-discussion,
	kernel-janitors

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 */

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-04-28 20:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-27  8:05 [patch] tipc: remove an unnecessary NULL check Dan Carpenter
2016-04-27 10:51 ` Xue, Ying
2016-04-28 20:54 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox