Message ID | 33444ac1-9a8b-bd7d-fd22-f299add190df@users.sourceforge.net (mailing list archive) |
---|---|
State | Rejected |
Delegated to: | Kalle Valo |
Headers | show |
diff --git a/drivers/net/wireless/cisco/airo.c b/drivers/net/wireless/cisco/airo.c index 86e795de6760..a65d82d26eaa 100644 --- a/drivers/net/wireless/cisco/airo.c +++ b/drivers/net/wireless/cisco/airo.c @@ -2714,12 +2714,7 @@ static int airo_networks_allocate(struct airo_info *ai) ai->networks = kcalloc(AIRO_MAX_NETWORK_COUNT, sizeof(BSSListElement), GFP_KERNEL); - if (!ai->networks) { - airo_print_warn("", "Out of memory allocating beacons"); - return -ENOMEM; - } - - return 0; + return ai->networks ? 0 : -ENOMEM; } static void airo_networks_free(struct airo_info *ai)