* [PATCH] wifi: nl80211: remove redundant null pointer check in coalescing
@ 2024-10-03 9:59 Dmitry Kandybka
0 siblings, 0 replies; only message in thread
From: Dmitry Kandybka @ 2024-10-03 9:59 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, lvc-project, Dmitry Antipov
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>
---
net/wireless/nl80211.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 9ab777e0bd4d..b71fa8beea1f 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);
--
2.43.5
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-10-03 9:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-03 9:59 [PATCH] wifi: nl80211: remove redundant null pointer check in coalescing Dmitry Kandybka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).