aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/brcm/420-v5.6-brcmfmac-Remove-always-false-idx-0-statement.patch
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2020-02-06 11:36:15 +0100
committerRafał Miłecki <rafal@milecki.pl>2020-02-07 11:05:24 +0100
commit887eb669f9129bd6a15e4e22de89d8a3a2c5ec60 (patch)
tree4b22b2c0b4dbeda483ac4ee7e21c98f89ed047f7 /package/kernel/mac80211/patches/brcm/420-v5.6-brcmfmac-Remove-always-false-idx-0-statement.patch
parentd91b52b1a2edd3645c88b29deb1091ae5f82fda8 (diff)
downloadupstream-887eb669f9129bd6a15e4e22de89d8a3a2c5ec60.tar.gz
upstream-887eb669f9129bd6a15e4e22de89d8a3a2c5ec60.tar.bz2
upstream-887eb669f9129bd6a15e4e22de89d8a3a2c5ec60.zip
mac80211: brcm: backport remaining 5.6 kernel patches
Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit aca274091ad3b50b770c0dd44f3ceefe8095d528)
Diffstat (limited to 'package/kernel/mac80211/patches/brcm/420-v5.6-brcmfmac-Remove-always-false-idx-0-statement.patch')
-rw-r--r--package/kernel/mac80211/patches/brcm/420-v5.6-brcmfmac-Remove-always-false-idx-0-statement.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/brcm/420-v5.6-brcmfmac-Remove-always-false-idx-0-statement.patch b/package/kernel/mac80211/patches/brcm/420-v5.6-brcmfmac-Remove-always-false-idx-0-statement.patch
new file mode 100644
index 0000000000..9efa762830
--- /dev/null
+++ b/package/kernel/mac80211/patches/brcm/420-v5.6-brcmfmac-Remove-always-false-idx-0-statement.patch
@@ -0,0 +1,24 @@
+From 627b0d094240c38393b2f2d40626c33a8fff6103 Mon Sep 17 00:00:00 2001
+From: yuehaibing <yuehaibing@huawei.com>
+Date: Wed, 8 Jan 2020 21:57:48 +0800
+Subject: [PATCH] brcmfmac: Remove always false 'idx < 0' statement
+
+idx is declared as u32, it will never less than 0.
+
+Signed-off-by: yuehaibing <yuehaibing@huawei.com>
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+---
+ drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c
++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c
+@@ -365,7 +365,7 @@ brcmf_msgbuf_get_pktid(struct device *de
+ struct brcmf_msgbuf_pktid *pktid;
+ struct sk_buff *skb;
+
+- if (idx < 0 || idx >= pktids->array_size) {
++ if (idx >= pktids->array_size) {
+ brcmf_err("Invalid packet id %d (max %d)\n", idx,
+ pktids->array_size);
+ return NULL;