netdev.vger.kernel.org archive mirror
 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

* Re: [patch] tipc: remove an unnecessary NULL check
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Xue, Ying @ 2016-04-27 10:51 UTC (permalink / raw)
  To: Dan Carpenter, Jon Maloy
  Cc: netdev@vger.kernel.org, kernel-janitors@vger.kernel.org,
	tipc-discussion@lists.sourceforge.net, David S. Miller

> From: Dan Carpenter [mailto:dan.carpenter@oracle.com]
> Sent: 2016年4月27日 16:05
> To: Jon Maloy
> Cc: Xue, Ying; David S. Miller; netdev@vger.kernel.org; tipc-
> discussion@lists.sourceforge.net; kernel-janitors@vger.kernel.org
> Subject: [patch] tipc: remove an unnecessary NULL check
> 
> 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>

Acked-by: Ying Xue <ying.xue@windriver.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 */
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
tipc-discussion mailing list
tipc-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tipc-discussion

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

* Re: [patch] tipc: remove an unnecessary NULL check
  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
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-04-28 20:54 UTC (permalink / raw)
  To: dan.carpenter
  Cc: jon.maloy, ying.xue, netdev, tipc-discussion, kernel-janitors

From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Wed, 27 Apr 2016 11:05:28 +0300

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

Applied to net-next, thanks.

^ permalink raw reply	[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;
as well as URLs for NNTP newsgroup(s).