From: Johannes Berg Date: Fri, 21 Oct 2016 10:15:00 +0000 (+0200) Subject: cfg80211: fix beacon interval in interface combination iteration X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0507a3ac6e98f50583912ec78d07c2e4daaf2b28;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git cfg80211: fix beacon interval in interface combination iteration We shouldn't abort the iteration with an error when one of the potential combinations can't accomodate the beacon interval request, we should just skip that particular combination. Fix the code to do so. Signed-off-by: Johannes Berg --- 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;