summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/wireless/util.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c
index ec17c2800117..78bf53705466 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -1676,10 +1676,8 @@ int cfg80211_iter_combinations(struct wiphy *wiphy,
if (params->beacon_int_gcd) {
if (c->beacon_int_min_gcd &&
- params->beacon_int_gcd < c->beacon_int_min_gcd) {
- kfree(limits);
- return -EINVAL;
- }
+ params->beacon_int_gcd < c->beacon_int_min_gcd)
+ goto cont;
if (!c->beacon_int_min_gcd &&
params->beacon_int_different)
goto cont;