提交 92e17ee7 编写于 作者: A Alexander Aring 提交者: Marcel Holtmann

6lowpan: fix debugfs interface entry name

This patches moves the debugfs interface related register after
netdevice register. The function lowpan_dev_debugfs_init will use
"dev->name" which can be before register_netdevice a format string.
The function register_netdevice will evaluate the format string if
necessary and replace "dev->name" to the real interface name.
Reported-by: NLukasz Duda <lukasz.duda@nordicsemi.no>
Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
Acked-by: NLukasz Duda <lukasz.duda@nordicsemi.no>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 7eb7404f
......@@ -29,13 +29,13 @@ int lowpan_register_netdevice(struct net_device *dev,
lowpan_priv(dev)->lltype = lltype;
ret = lowpan_dev_debugfs_init(dev);
ret = register_netdevice(dev);
if (ret < 0)
return ret;
ret = register_netdevice(dev);
ret = lowpan_dev_debugfs_init(dev);
if (ret < 0)
lowpan_dev_debugfs_exit(dev);
unregister_netdevice(dev);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册