|
@@ -871,8 +871,10 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
|
|
local->hw.wiphy->cipher_suites,
|
|
local->hw.wiphy->cipher_suites,
|
|
sizeof(u32) * local->hw.wiphy->n_cipher_suites,
|
|
sizeof(u32) * local->hw.wiphy->n_cipher_suites,
|
|
GFP_KERNEL);
|
|
GFP_KERNEL);
|
|
- if (!suites)
|
|
|
|
- return -ENOMEM;
|
|
|
|
|
|
+ if (!suites) {
|
|
|
|
+ result = -ENOMEM;
|
|
|
|
+ goto fail_wiphy_register;
|
|
|
|
+ }
|
|
for (r = 0; r < local->hw.wiphy->n_cipher_suites; r++) {
|
|
for (r = 0; r < local->hw.wiphy->n_cipher_suites; r++) {
|
|
u32 suite = local->hw.wiphy->cipher_suites[r];
|
|
u32 suite = local->hw.wiphy->cipher_suites[r];
|
|
if (suite == WLAN_CIPHER_SUITE_WEP40 ||
|
|
if (suite == WLAN_CIPHER_SUITE_WEP40 ||
|