aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
Diffstat (limited to 'net/core')
-rw-r--r--net/core/net-sysfs.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 61ead1d11132..e41f4b9d2e7e 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,
247 struct net_device_stats *stats; 247 struct net_device_stats *stats;
248 ssize_t ret = -EINVAL; 248 ssize_t ret = -EINVAL;
249 249
250 if (offset > sizeof(struct net_device_stats) || 250 WARN_ON(offset > sizeof(struct net_device_stats) ||
251 offset % sizeof(unsigned long) != 0) 251 offset % sizeof(unsigned long) != 0);
252 WARN_ON(1);
253 252
254 read_lock(&dev_base_lock); 253 read_lock(&dev_base_lock);
255 if (dev_isalive(dev) && dev->get_stats && 254 if (dev_isalive(dev) && dev->get_stats &&