Skip to content

Commit

Permalink
6lowpan: fix debugfs interface entry name
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Alexander Aring <[email protected]>
Acked-by: Lukasz Duda <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
  • Loading branch information
alexaring authored and holtmann committed Dec 20, 2015
1 parent 7eb7404 commit 92e17ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/6lowpan/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 92e17ee

Please sign in to comment.