diff options
author | David S. Miller <davem@davemloft.net> | 2018-01-17 00:00:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-17 00:10:42 -0500 |
commit | c02b3741eb99a1ec733e6134c53ba59e43e19e97 (patch) | |
tree | ff7dd96c32dec2abe530e7101378443dabcb8962 /net/wireless/core.c | |
parent | 7018d1b3f20fb4308ed9bc577160cb8ffb79b62a (diff) | |
parent | 8cbab92dff778e516064c13113ca15d4869ec883 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Overlapping changes all over.
The mini-qdisc bits were a little bit tricky, however.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/wireless/core.c')
-rw-r--r-- | net/wireless/core.c | 8 |
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 | |||
442 | use_default_name: | 444 | use_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); |