From: Roman Smirnov Date: Thu, 7 Mar 2024 07:17:17 +0000 (+0300) Subject: assoc_array: fix the return value in assoc_array_insert_mid_shortcut() X-Git-Tag: v6.9-rc1~106^2~4 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=bea0a58695870295a315cec15a9fea6f40fe5ff3;p=linux-block.git 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 Reviewed-by: Sergey Shtylyov Signed-off-by: Andrew Morton --- diff --git a/lib/assoc_array.c b/lib/assoc_array.c index ca0b4f360c1a..388e656ac974 100644 --- a/lib/assoc_array.c +++ b/lib/assoc_array.c @@ -938,7 +938,7 @@ static bool assoc_array_insert_mid_shortcut(struct assoc_array_edit *edit, edit->leaf_p = &new_n0->slots[0]; pr_devel("<--%s() = ok [split shortcut]\n", __func__); - return edit; + return true; } /**