]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/can/af_can.c
net: use net_eq to compare nets
[net-next-2.6.git] / net / can / af_can.c
index 833bd838edc69c74d9eb6cfabba12f3d2f96f8ce..f3067172886481a575c277f7d199d13d123be814 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