diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-03-03 21:55:21 (GMT) |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-03-06 20:54:32 (GMT) |
commit | bd05f28e1a15ae62994fe309a524695fe26dd834 (patch) | |
tree | ef5cddeab99411715e1a689d5936dc9eacc74bfb /net | |
parent | 623d563e52d4d4041612e24b33a5610a900dd778 (diff) | |
download | linux-fsl-qoriq-bd05f28e1a15ae62994fe309a524695fe26dd834.tar.xz |
cfg80211: test before subtraction on unsigned
freq_diff is unsigned, so test before subtraction
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/wireless/reg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 85c9034..bd0a16c 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -380,7 +380,8 @@ static bool is_valid_reg_rule(const struct ieee80211_reg_rule *rule) freq_diff = freq_range->end_freq_khz - freq_range->start_freq_khz; - if (freq_diff <= 0 || freq_range->max_bandwidth_khz > freq_diff) + if (freq_range->end_freq_khz <= freq_range->start_freq_khz || + freq_range->max_bandwidth_khz > freq_diff) return false; return true; |