All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] tipc: remove an unnecessary NULL check
@ 2016-04-27  8:05 ` Dan Carpenter
  0 siblings, 0 replies; 6+ 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] 6+ messages in thread

* [patch] tipc: remove an unnecessary NULL check
@ 2016-04-27  8:05 ` Dan Carpenter
  0 siblings, 0 replies; 6+ 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] 6+ messages in thread

* RE: [patch] tipc: remove an unnecessary NULL check
  2016-04-27  8:05 ` Dan Carpenter
@ 2016-04-27 10:51   ` Xue, Ying
  -1 siblings, 0 replies; 6+ 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

PiBGcm9tOiBEYW4gQ2FycGVudGVyIFttYWlsdG86ZGFuLmNhcnBlbnRlckBvcmFjbGUuY29tXQ0K
PiBTZW50OiAyMDE2xOo01MIyN8jVIDE2OjA1DQo+IFRvOiBKb24gTWFsb3kNCj4gQ2M6IFh1ZSwg
WWluZzsgRGF2aWQgUy4gTWlsbGVyOyBuZXRkZXZAdmdlci5rZXJuZWwub3JnOyB0aXBjLQ0KPiBk
aXNjdXNzaW9uQGxpc3RzLnNvdXJjZWZvcmdlLm5ldDsga2VybmVsLWphbml0b3JzQHZnZXIua2Vy
bmVsLm9yZw0KPiBTdWJqZWN0OiBbcGF0Y2hdIHRpcGM6IHJlbW92ZSBhbiB1bm5lY2Vzc2FyeSBO
VUxMIGNoZWNrDQo+IA0KPiBUaGlzIGlzIG5ldmVyIGNhbGxlZCB3aXRoIGEgTlVMTCAiYnVmIiBh
bmQgYW55d2F5LCB3ZSBkZXJlZmVyZW5jZSAncycgb24gdGhlDQo+IGxpbmVzIGJlZm9yZSBzbyBp
dCB3b3VsZCBPb3BzIGJlZm9yZSB3ZSByZWFjaCB0aGUgY2hlY2suDQo+IA0KPiBTaWduZWQtb2Zm
LWJ5OiBEYW4gQ2FycGVudGVyIDxkYW4uY2FycGVudGVyQG9yYWNsZS5jb20+DQoNCkFja2VkLWJ5
OiBZaW5nIFh1ZSA8eWluZy54dWVAd2luZHJpdmVyLmNvbT4NCg0KPiANCj4gZGlmZiAtLWdpdCBh
L25ldC90aXBjL3N1YnNjci5jIGIvbmV0L3RpcGMvc3Vic2NyLmMgaW5kZXggNzlkZTU4OC4uMGRk
MDIyNA0KPiAxMDA2NDQNCj4gLS0tIGEvbmV0L3RpcGMvc3Vic2NyLmMNCj4gKysrIGIvbmV0L3Rp
cGMvc3Vic2NyLmMNCj4gQEAgLTMyNiw4ICszMjYsNyBAQCBzdGF0aWMgdm9pZCB0aXBjX3N1YnNj
cmJfcmN2X2NiKHN0cnVjdCBuZXQgKm5ldCwgaW50DQo+IGNvbmlkLA0KPiAgCQlyZXR1cm4gdGlw
Y19zdWJzY3JwX2NhbmNlbChzLCBzdWJzY3JpYmVyKTsNCj4gIAl9DQo+IA0KPiAtCWlmIChzKQ0K
PiAtCQl0aXBjX3N1YnNjcnBfc3Vic2NyaWJlKG5ldCwgcywgc3Vic2NyaWJlciwgc3dhcCk7DQo+
ICsJdGlwY19zdWJzY3JwX3N1YnNjcmliZShuZXQsIHMsIHN1YnNjcmliZXIsIHN3YXApOw0KPiAg
fQ0KPiANCj4gIC8qIEhhbmRsZSBvbmUgcmVxdWVzdCB0byBlc3RhYmxpc2ggYSBuZXcgc3Vic2Ny
aWJlciAqLw0K

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

* Re: [patch] tipc: remove an unnecessary NULL check
@ 2016-04-27 10:51   ` Xue, Ying
  0 siblings, 0 replies; 6+ 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] 6+ messages in thread

* Re: [patch] tipc: remove an unnecessary NULL check
  2016-04-27  8:05 ` Dan Carpenter
@ 2016-04-28 20:54   ` David Miller
  -1 siblings, 0 replies; 6+ 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] 6+ messages in thread

* Re: [patch] tipc: remove an unnecessary NULL check
@ 2016-04-28 20:54   ` David Miller
  0 siblings, 0 replies; 6+ 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] 6+ messages in thread

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

Thread overview: 6+ 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  8:05 ` Dan Carpenter
2016-04-27 10:51 ` Xue, Ying
2016-04-27 10:51   ` Xue, Ying
2016-04-28 20:54 ` David Miller
2016-04-28 20:54   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.