mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 04:34:03 +02: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:
parent
4a02312098
commit
4903ab0c83
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user