]> err.no Git - linux-2.6/blobdiff - net/core/net-sysfs.c
netfilter: ip_tables: add iptables security table for mandatory access control rules
[linux-2.6] / net / core / net-sysfs.c
index 90e2177af081ec724cad7bef0b72b4ba7e818d17..dccd737ea2e3396aa24824660b38095e78105f4e 100644 (file)
@@ -242,11 +242,11 @@ static ssize_t netstat_show(const struct device *d,
                        offset % sizeof(unsigned long) != 0);
 
        read_lock(&dev_base_lock);
-       if (dev_isalive(dev) && dev->get_stats &&
-           (stats = (*dev->get_stats)(dev)))
+       if (dev_isalive(dev)) {
+               stats = dev->get_stats(dev);
                ret = sprintf(buf, fmt_ulong,
                              *(unsigned long *)(((u8 *) stats) + offset));
-
+       }
        read_unlock(&dev_base_lock);
        return ret;
 }
@@ -457,8 +457,7 @@ int netdev_register_kobject(struct net_device *net)
        strlcpy(dev->bus_id, net->name, BUS_ID_SIZE);
 
 #ifdef CONFIG_SYSFS
-       if (net->get_stats)
-               *groups++ = &netstat_group;
+       *groups++ = &netstat_group;
 
 #ifdef CONFIG_WIRELESS_EXT
        if (net->wireless_handlers && net->wireless_handlers->get_wireless_stats)