net: use net_eq to compare nets
[pandora-kernel.git] / net / can / af_can.c
index 833bd83..f306717 100644 (file)
@@ -126,7 +126,7 @@ static int can_create(struct net *net, struct socket *sock, int protocol,
        if (protocol < 0 || protocol >= CAN_NPROTO)
                return -EINVAL;
 
-       if (net != &init_net)
+       if (!net_eq(net, &init_net))
                return -EAFNOSUPPORT;
 
 #ifdef CONFIG_MODULES