diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-10-08 12:18:36 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-10-15 04:48:00 +0400 |
commit | c74e90a9e37c4a3923905189a6ebbd7ef61e6e67 (patch) | |
tree | c22f8d8fcf806dc281d5fb69327d11769593116c /net | |
parent | d5d7c584810b3be2b70c979af3283a1e48b6574d (diff) | |
download | linux-c74e90a9e37c4a3923905189a6ebbd7ef61e6e67.tar.xz |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/debugfs_netdev.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c index 2a4515623776..2ad504fc3414 100644 --- a/net/mac80211/debugfs_netdev.c +++ b/net/mac80211/debugfs_netdev.c @@ -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); |