[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1450178735-1572-1-git-send-email-alex.aring@gmail.com>
Date: Tue, 15 Dec 2015 12:25:35 +0100
From: Alexander Aring <alex.aring@...il.com>
To: linux-wpan@...r.kernel.org
Cc: linux-bluetooth@...r.kernel.org, netdev@...r.kernel.org,
kernel@...gutronix.de, lukasz.duda@...dicsemi.no,
Alexander Aring <alex.aring@...il.com>
Subject: [PATCH bluetooth-next] 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@...dicsemi.no>
Signed-off-by: Alexander Aring <alex.aring@...il.com>
---
net/6lowpan/core.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/6lowpan/core.c b/net/6lowpan/core.c
index c7f06f5..faf65ba 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;
}
--
2.6.1
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists