diff options
author | 2018-08-29 12:50:18 -0500 | |
---|---|---|
committer | 2018-09-06 18:56:14 +0300 | |
commit | 49925f24701600433d0342135e9963818c6b0238 (patch) | |
tree | 090637a3a015d4f881382544e425681599bc8a85 /drivers/net/wireless/ath/wil6210/wil6210.h | |
parent | ath10k: enable pktlog for WCN3990 target (diff) | |
download | linux-dev-49925f24701600433d0342135e9963818c6b0238.tar.xz linux-dev-49925f24701600433d0342135e9963818c6b0238.zip |
wil6210: fix unsigned cid comparison with >= 0
The comparison of cid >= 0 is always true because cid is of type u8
(8 bits, unsigned).
Fix this by removing such comparison and updating the type of
variable cid to u8 in the caller function.
Addresses-Coverity-ID: 1473079 ("Unsigned compared against 0")
Fixes: b9010f105f21 ("wil6210: add FT roam support for AP and station")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/wil6210.h')
-rw-r--r-- | drivers/net/wireless/ath/wil6210/wil6210.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h index cf6a69198b5d..abb82018d3b4 100644 --- a/drivers/net/wireless/ath/wil6210/wil6210.h +++ b/drivers/net/wireless/ath/wil6210/wil6210.h @@ -455,7 +455,7 @@ static inline void parse_cidxtid(u8 cidxtid, u8 *cid, u8 *tid) */ static inline bool wil_cid_valid(u8 cid) { - return (cid >= 0 && cid < WIL6210_MAX_CID); + return cid < WIL6210_MAX_CID; } struct wil6210_mbox_ring { |