1 Subject: mac80211: fix debugfs netdev rename
3 If, for some reason, a netdev has no debugfs dir, we shouldn't
4 try to rename that dir.
6 Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
7 Cc: Robin Holt <holt@sgi.com>
9 net/mac80211/debugfs_netdev.c | 6 +++++-
10 1 file changed, 5 insertions(+), 1 deletion(-)
12 --- everything.orig/net/mac80211/debugfs_netdev.c 2008-10-08 10:08:23.000000000 +0200
13 +++ everything/net/mac80211/debugfs_netdev.c 2008-10-08 10:22:52.000000000 +0200
14 @@ -481,8 +481,12 @@ static int netdev_notify(struct notifier
16 sdata = IEEE80211_DEV_TO_SUB_IF(dev);
18 - sprintf(buf, "netdev:%s", dev->name);
19 dir = sdata->debugfsdir;
24 + sprintf(buf, "netdev:%s", dev->name);
25 if (!debugfs_rename(dir->d_parent, dir, dir->d_parent, buf))
26 printk(KERN_ERR "mac80211: debugfs: failed to rename debugfs "