* [PATCH net-next] tipc: checking for NULL instead of IS_ERR()
@ 2017-10-18 7:48 Dan Carpenter
2017-10-20 7:34 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2017-10-18 7:48 UTC (permalink / raw)
To: Jon Maloy
Cc: Ying Xue, David S. Miller, netdev, tipc-discussion,
kernel-janitors
The tipc_alloc_conn() function never returns NULL, it returns error
pointers, so I have fixed the check.
Fixes: 14c04493cb77 ("tipc: add ability to order and receive topology events in driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/net/tipc/server.c b/net/tipc/server.c
index 713077536d0c..acaef80fb88c 100644
--- a/net/tipc/server.c
+++ b/net/tipc/server.c
@@ -504,7 +504,7 @@ bool tipc_topsrv_kern_subscr(struct net *net, u32 port, u32 type,
*(u32 *)&sub.usr_handle = port;
con = tipc_alloc_conn(tipc_topsrv(net));
- if (!con)
+ if (IS_ERR(con))
return false;
*conid = con->conid;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-20 7:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-18 7:48 [PATCH net-next] tipc: checking for NULL instead of IS_ERR() Dan Carpenter
2017-10-20 7:34 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox