aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless/core.c')
-rw-r--r--net/wireless/core.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c
index fdde0d98fde1..a6f3cac8c640 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -439,6 +439,8 @@ struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
439 if (rv) 439 if (rv)
440 goto use_default_name; 440 goto use_default_name;
441 } else { 441 } else {
442 int rv;
443
442use_default_name: 444use_default_name:
443 /* NOTE: This is *probably* safe w/out holding rtnl because of 445 /* NOTE: This is *probably* safe w/out holding rtnl because of
444 * the restrictions on phy names. Probably this call could 446 * the restrictions on phy names. Probably this call could
@@ -446,7 +448,11 @@ use_default_name:
446 * phyX. But, might should add some locking and check return 448 * phyX. But, might should add some locking and check return
447 * value, and use a different name if this one exists? 449 * value, and use a different name if this one exists?
448 */ 450 */
449 dev_set_name(&rdev->wiphy.dev, PHY_NAME "%d", rdev->wiphy_idx); 451 rv = dev_set_name(&rdev->wiphy.dev, PHY_NAME "%d", rdev->wiphy_idx);
452 if (rv < 0) {
453 kfree(rdev);
454 return NULL;
455 }
450 } 456 }
451 457
452 INIT_LIST_HEAD(&rdev->wiphy.wdev_list); 458 INIT_LIST_HEAD(&rdev->wiphy.wdev_list);