summaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorDmitry Kandybka <d.kandybka@gmail.com>2024-10-03 11:59:12 +0200
committerJohannes Berg <johannes.berg@intel.com>2024-10-08 21:52:15 +0200
commit484bd64bdc2721224e90e131607398e546cf84b1 (patch)
tree3b7246151fe58f71fcea397cae01b6a3a20354d4 /net/wireless
parentmac80211: Reorganize kerneldoc parameter names (diff)
downloadlinux-484bd64bdc2721224e90e131607398e546cf84b1.tar.xz
linux-484bd64bdc2721224e90e131607398e546cf84b1.zip
wifi: nl80211: remove redundant null pointer check in coalescing
In 'cfg80211_free_coalesce', '&coalesce->rules[i]' is a pointer to VLA member of 'struct cfg80211_coalesce' and should never be NULL, so redundant check may be dropped. I think this is correct, but I haven't tested it seriously. Compile tested only. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Dmitry Kandybka <d.kandybka@gmail.com> Link: https://patch.msgid.link/20241003095912.218465-1-d.kandybka@gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/nl80211.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index d51bcb4e9108..4e3609176880 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -14061,8 +14061,6 @@ void cfg80211_free_coalesce(struct cfg80211_coalesce *coalesce)
for (i = 0; i < coalesce->n_rules; i++) {
rule = &coalesce->rules[i];
- if (!rule)
- continue;
for (j = 0; j < rule->n_patterns; j++)
kfree(rule->patterns[j].mask);
kfree(rule->patterns);