diff options
-rw-r--r-- | net/core/net-sysfs.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 61ead1d..e41f4b9 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -247,9 +247,8 @@ static ssize_t netstat_show(const struct device *d, struct net_device_stats *stats; ssize_t ret = -EINVAL; - if (offset > sizeof(struct net_device_stats) || - offset % sizeof(unsigned long) != 0) - WARN_ON(1); + WARN_ON(offset > sizeof(struct net_device_stats) || + offset % sizeof(unsigned long) != 0); read_lock(&dev_base_lock); if (dev_isalive(dev) && dev->get_stats && |