[PATCH][next] mm/execmem: Remove logically deadcode in execmem.c
From: Everest K.C.
Date: Thu Oct 10 2024 - 14:13:15 EST
NULL check of variable `area` within the `mas_for_each` loop is
unnecessary, as the varialbe `area` can never be NULL. So, the
`continue` statement inside the if block is never reached.
Remove the if block that performs the NULL check.
This was reported by Coverity Scan:
https://scan7.scan.coverity.com/#/project-view/51525/11354?selectedIssue=1600362
Fixes: d44c3485820e ("execmem: add support for cache of large ROX pages")
Signed-off-by: Everest K.C. <everestkc@xxxxxxxxxxxxxxxx>
---
mm/execmem.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/mm/execmem.c b/mm/execmem.c
index 9c6ff9687860..97706d8ed720 100644
--- a/mm/execmem.c
+++ b/mm/execmem.c
@@ -75,9 +75,6 @@ static void execmem_cache_clean(struct work_struct *work)
mas_for_each(&mas, area, ULONG_MAX) {
size_t size;
- if (!area)
- continue;
-
size = mas_range_len(&mas);
if (IS_ALIGNED(size, PMD_SIZE) &&
--
2.43.0