From f290bfd376fcc871f40c9ac639aac70fa38d7b99 Mon Sep 17 00:00:00 2001 From: Russell King Date: Sat, 18 Oct 2003 10:08:39 -0700 Subject: [PATCH] [NET]: Prevent 'eth0: driver changed get_stats after register' from lying. --- net/core/net-sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index ae9b5c8e80983..5281a1eb6c0b6 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -408,6 +408,7 @@ int netdev_register_sysfs(struct net_device *net) class_dev->class = &net_class; class_dev->class_data = net; + net->last_stats = net->get_stats; strlcpy(class_dev->class_id, net->name, BUS_ID_SIZE); if ((ret = class_device_register(class_dev))) @@ -419,7 +420,6 @@ int netdev_register_sysfs(struct net_device *net) } - net->last_stats = net->get_stats; if (net->get_stats && (ret = sysfs_create_group(&class_dev->kobj, &netstat_group))) goto out_unreg; -- 2.53.0