aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/reg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 8e5d23975a0d..34983a825ac1 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -321,7 +321,7 @@ static bool is_valid_reg_rule(const struct ieee80211_reg_rule *rule)
321 321
322 freq_diff = freq_range->end_freq_khz - freq_range->start_freq_khz; 322 freq_diff = freq_range->end_freq_khz - freq_range->start_freq_khz;
323 323
324 if (freq_range->max_bandwidth_khz > freq_diff) 324 if (freq_diff <= 0 || freq_range->max_bandwidth_khz > freq_diff)
325 return false; 325 return false;
326 326
327 return true; 327 return true;