aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/server.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-10-18 10:48:25 +0300
committerDavid S. Miller <davem@davemloft.net>2017-10-20 08:34:00 +0100
commitc75e427d9349ec3e0059752cc784e1c301474c2d (patch)
tree3f955552a1d3a5d6ccd22cda5432d5fc6c173009 /net/tipc/server.c
parent6575f35415c406b58e9f6235df4b8272f8696131 (diff)
tipc: checking for NULL instead of IS_ERR()
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/server.c')
-rw-r--r--net/tipc/server.c2
1 files changed, 1 insertions, 1 deletions
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;

Privacy Policy