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: Lukasz Duda <lukasz.duda@nordicsemi.no> Signed-off-by: Alexander Aring <alex.aring@gmail.com> Acked-by: Lukasz Duda <lukasz.duda@nordicsemi.no> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
7eb7404f7e
commit
92e17ee72a
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue