tipc: remove an unnecessary NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 27 Apr 2016 08:05:28 +0000 (11:05 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Apr 2016 20:54:12 +0000 (16:54 -0400)
This is never called with a NULL "buf" and anyway, we dereference 's' on
the lines before so it would Oops before we reach the check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/subscr.c

index 79de588c7bd687c485eef5410366011b6686189e..0dd02244e21d72b8e53e371d51eeae53e4b15a41 100644 (file)
@@ -326,8 +326,7 @@ static void tipc_subscrb_rcv_cb(struct net *net, int conid,
                return tipc_subscrp_cancel(s, subscriber);
        }
 
-       if (s)
-               tipc_subscrp_subscribe(net, s, subscriber, swap);
+       tipc_subscrp_subscribe(net, s, subscriber, swap);
 }
 
 /* Handle one request to establish a new subscriber */