Skip to contentSkip to conversation

uprobes: remove unneeded condition

PATCH New Muhammad Usama Anjum 1 participant 1 message Sep 6, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 uprobes: remove unneeded condition

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")
---
 kernel/events/uprobes.c | 3 ---
 1 file changed, 3 deletions(-)
kernel/events/uprobes.c +0 -3
index 778f1978538ce..9f864504a7e92 100644
@@ -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);
Signature · 1 line
2.39.2