[PATCH] uprobes: remove unneeded condition

From: Muhammad Usama Anjum
Date: Fri Sep 06 2024 - 06:19:12 EST


The area cannot be NULL as we are getting it through container_of().
Hence there is no need to check its validity. Remove the if condition
and return statement.

Fixes: c67907222c56 ("uprobes: use vm_special_mapping close() functionality")
Signed-off-by: Muhammad Usama Anjum <usama.anjum@xxxxxxxxxxxxx>
---
kernel/events/uprobes.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index 778f1978538ce..9f864504a7e92 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -1474,9 +1474,6 @@ static void uprobe_clear_state(const struct vm_special_mapping *sm, struct vm_ar
delayed_uprobe_remove(NULL, vma->vm_mm);
mutex_unlock(&delayed_uprobe_lock);

- if (!area)
- return;
-
put_page(area->pages[0]);
kfree(area->bitmap);
kfree(area);
--
2.39.2