Skip to content

Commit c75e427

Browse files
Dan Carpenterdavem330
authored andcommitted
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: 14c0449 ("tipc: add ability to order and receive topology events in driver") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 6575f35 commit c75e427

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/tipc/server.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ bool tipc_topsrv_kern_subscr(struct net *net, u32 port, u32 type,
504504
*(u32 *)&sub.usr_handle = port;
505505

506506
con = tipc_alloc_conn(tipc_topsrv(net));
507-
if (!con)
507+
if (IS_ERR(con))
508508
return false;
509509

510510
*conid = con->conid;

0 commit comments

Comments
 (0)