From: Alexander Aring Date: Tue, 15 Dec 2015 11:25:35 +0000 (+0100) Subject: 6lowpan: fix debugfs interface entry name X-Git-Tag: v4.5-rc1~128^2~82^2~4 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=92e17ee72a60b126263cbcd749e5da688e0198a3;p=karo-tx-linux.git 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 Signed-off-by: Alexander Aring Acked-by: Lukasz Duda Signed-off-by: Marcel Holtmann --- diff --git a/net/6lowpan/core.c b/net/6lowpan/core.c index c7f06f5c0121..faf65baed617 100644 --- a/net/6lowpan/core.c +++ b/net/6lowpan/core.c @@ -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; }