diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/wireless/core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c index 24fdd4cd22cb..5031db7b275b 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c | |||
@@ -184,7 +184,8 @@ int cfg80211_dev_rename(struct cfg80211_registered_device *rdev, | |||
184 | if (result) | 184 | if (result) |
185 | goto out_unlock; | 185 | goto out_unlock; |
186 | 186 | ||
187 | if (!debugfs_rename(rdev->wiphy.debugfsdir->d_parent, | 187 | if (rdev->wiphy.debugfsdir && |
188 | !debugfs_rename(rdev->wiphy.debugfsdir->d_parent, | ||
188 | rdev->wiphy.debugfsdir, | 189 | rdev->wiphy.debugfsdir, |
189 | rdev->wiphy.debugfsdir->d_parent, | 190 | rdev->wiphy.debugfsdir->d_parent, |
190 | newname)) | 191 | newname)) |
@@ -317,6 +318,8 @@ int wiphy_register(struct wiphy *wiphy) | |||
317 | drv->wiphy.debugfsdir = | 318 | drv->wiphy.debugfsdir = |
318 | debugfs_create_dir(wiphy_name(&drv->wiphy), | 319 | debugfs_create_dir(wiphy_name(&drv->wiphy), |
319 | ieee80211_debugfs_dir); | 320 | ieee80211_debugfs_dir); |
321 | if (IS_ERR(drv->wiphy.debugfsdir)) | ||
322 | drv->wiphy.debugfsdir = NULL; | ||
320 | 323 | ||
321 | res = 0; | 324 | res = 0; |
322 | out_unlock: | 325 | out_unlock: |