From: Dan Carpenter Date: Wed, 18 Oct 2017 07:48:25 +0000 (+0300) Subject: tipc: checking for NULL instead of IS_ERR() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c75e427d9349ec3e0059752cc784e1c301474c2d;p=linux.git 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 Signed-off-by: David S. Miller --- diff --git a/net/tipc/server.c b/net/tipc/server.c index 713077536d0ce..acaef80fb88cf 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;