Bluetooth: Initialize variables and timers for both channel's sides
[safe/jmp/linux-2.6] / net / dcb / dcbnl.c
index ac1205d..db9f5b3 100644 (file)
@@ -1085,8 +1085,8 @@ static int dcbnl_bcn_setcfg(struct net_device *netdev, struct nlattr **tb,
        u8 value_byte;
        u32 value_int;
 
-       if (!tb[DCB_ATTR_BCN] || !netdev->dcbnl_ops->setbcncfg
-           || !netdev->dcbnl_ops->setbcnrp)
+       if (!tb[DCB_ATTR_BCN] || !netdev->dcbnl_ops->setbcncfg ||
+           !netdev->dcbnl_ops->setbcnrp)
                return ret;
 
        ret = nla_parse_nested(data, DCB_BCN_ATTR_MAX,
@@ -1126,7 +1126,7 @@ static int dcb_doit(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
        u32 pid = skb ? NETLINK_CB(skb).pid : 0;
        int ret = -EINVAL;
 
-       if (net != &init_net)
+       if (!net_eq(net, &init_net))
                return -EINVAL;
 
        ret = nlmsg_parse(nlh, sizeof(*dcb), tb, DCB_ATTR_MAX,