diff mbox series

uprobes: remove unneeded condition

Message ID 20240906101825.177490-1-usama.anjum@collabora.com (mailing list archive)
State Handled Elsewhere
Commit 08e28de1160a712724268fd33d77b32f1bc84d1c
Headers show
Series uprobes: remove unneeded condition | expand

Commit Message

Muhammad Usama Anjum Sept. 6, 2024, 10:18 a.m. UTC
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@collabora.com>
---
 kernel/events/uprobes.c | 3 ---
 1 file changed, 3 deletions(-)
diff mbox series

Patch

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);