Skip to content

Commit

Permalink
tipc: checking for NULL instead of IS_ERR()
Browse files Browse the repository at this point in the history
The tipc_alloc_conn() function never returns NULL, it returns error
pointers, so I have fixed the check.

Fixes: 14c0449 ("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>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Oct 20, 2017
1 parent 6575f35 commit c75e427
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/tipc/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c75e427

Please sign in to comment.