mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
futex: Remove unnecessary NULL check before kvfree()
The NULL check before kvfree() is unnecessary and triggers a Coccinelle warning, since kvfree() handles NULL arguments internally. Reported by ifnullfree.cocci Coccinelle semantic patch script. Signed-off-by: Vasileios Almpanis <vasilisalmpanis@gmail.com> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Reviewed-by: André Almeida <andrealmeid@igalia.com> Link: https://patch.msgid.link/20260630133530.2577832-1-vasilisalmpanis@gmail.com
This commit is contained in:
committed by
Thomas Gleixner
parent
4a02312098
commit
4903ab0c83
+1
-2
@@ -1746,8 +1746,7 @@ void futex_hash_free(struct mm_struct *mm)
|
||||
free_percpu(mm->futex.phash.ref);
|
||||
kvfree(mm->futex.phash.hash_new);
|
||||
fph = rcu_dereference_raw(mm->futex.phash.hash);
|
||||
if (fph)
|
||||
kvfree(fph);
|
||||
kvfree(fph);
|
||||
}
|
||||
|
||||
static bool futex_pivot_pending(struct mm_struct *mm)
|
||||
|
||||
Reference in New Issue
Block a user