Commit f290bfd3 authored by Russell King's avatar Russell King

[NET]: Prevent 'eth0: driver changed get_stats after register' from lying.

parent 2f532b1b
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment