提交 c74e90a9 编写于 作者: J Johannes Berg 提交者: John W. Linville

mac80211: fix debugfs netdev rename

If, for some reason, a netdev has no debugfs dir, we shouldn't
try to rename that dir.
Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
Cc: Robin Holt <holt@sgi.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 d5d7c584
......@@ -545,8 +545,12 @@ static int netdev_notify(struct notifier_block *nb,
sdata = IEEE80211_DEV_TO_SUB_IF(dev);
sprintf(buf, "netdev:%s", dev->name);
dir = sdata->debugfsdir;
if (!dir)
return 0;
sprintf(buf, "netdev:%s", dev->name);
if (!debugfs_rename(dir->d_parent, dir, dir->d_parent, buf))
printk(KERN_ERR "mac80211: debugfs: failed to rename debugfs "
"dir to %s\n", buf);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册