assoc_array: fix the return value in assoc_array_insert_mid_shortcut()

Returning the edit variable is redundant because it is dereferenced right
before it is returned.  It would be better to return true.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Link: https://lkml.kernel.org/r/20240307071717.5318-1-r.smirnov@omp.ru
Signed-off-by: Roman Smirnov <r.smirnov@omp.ru>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
Roman Smirnov 2024-03-07 10:17:17 +03:00 committed by Andrew Morton
parent c44f063e74
commit bea0a58695

View File

@ -938,7 +938,7 @@ static bool assoc_array_insert_mid_shortcut(struct assoc_array_edit *edit,
edit->leaf_p = &new_n0->slots[0]; edit->leaf_p = &new_n0->slots[0];
pr_devel("<--%s() = ok [split shortcut]\n", __func__); pr_devel("<--%s() = ok [split shortcut]\n", __func__);
return edit; return true;
} }
/** /**