diff options
Diffstat (limited to 'net/mac80211/key.c')
| -rw-r--r-- | net/mac80211/key.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/mac80211/key.c b/net/mac80211/key.c index 8c02469b7176..af3c56482c80 100644 --- a/net/mac80211/key.c +++ b/net/mac80211/key.c | |||
| @@ -342,7 +342,7 @@ struct ieee80211_key *ieee80211_key_alloc(u32 cipher, int idx, size_t key_len, | |||
| 342 | if (IS_ERR(key->u.ccmp.tfm)) { | 342 | if (IS_ERR(key->u.ccmp.tfm)) { |
| 343 | err = PTR_ERR(key->u.ccmp.tfm); | 343 | err = PTR_ERR(key->u.ccmp.tfm); |
| 344 | kfree(key); | 344 | kfree(key); |
| 345 | key = ERR_PTR(err); | 345 | return ERR_PTR(err); |
| 346 | } | 346 | } |
| 347 | break; | 347 | break; |
| 348 | case WLAN_CIPHER_SUITE_AES_CMAC: | 348 | case WLAN_CIPHER_SUITE_AES_CMAC: |
| @@ -360,7 +360,7 @@ struct ieee80211_key *ieee80211_key_alloc(u32 cipher, int idx, size_t key_len, | |||
| 360 | if (IS_ERR(key->u.aes_cmac.tfm)) { | 360 | if (IS_ERR(key->u.aes_cmac.tfm)) { |
| 361 | err = PTR_ERR(key->u.aes_cmac.tfm); | 361 | err = PTR_ERR(key->u.aes_cmac.tfm); |
| 362 | kfree(key); | 362 | kfree(key); |
| 363 | key = ERR_PTR(err); | 363 | return ERR_PTR(err); |
| 364 | } | 364 | } |
| 365 | break; | 365 | break; |
| 366 | } | 366 | } |
| @@ -400,11 +400,12 @@ int ieee80211_key_link(struct ieee80211_key *key, | |||
| 400 | { | 400 | { |
| 401 | struct ieee80211_key *old_key; | 401 | struct ieee80211_key *old_key; |
| 402 | int idx, ret; | 402 | int idx, ret; |
| 403 | bool pairwise = key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE; | 403 | bool pairwise; |
| 404 | 404 | ||
| 405 | BUG_ON(!sdata); | 405 | BUG_ON(!sdata); |
| 406 | BUG_ON(!key); | 406 | BUG_ON(!key); |
| 407 | 407 | ||
| 408 | pairwise = key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE; | ||
| 408 | idx = key->conf.keyidx; | 409 | idx = key->conf.keyidx; |
| 409 | key->local = sdata->local; | 410 | key->local = sdata->local; |
| 410 | key->sdata = sdata; | 411 | key->sdata = sdata; |
