mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 12:16:20 +00:00
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: Johannes Berg <johannes@sipsolutions.net> Cc: Robin Holt <holt@sgi.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
d5d7c58481
commit
c74e90a9e3
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue