Skip to content

Commit bea0a58

Browse files
RSmirnov512akpm00
authored andcommitted
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>
1 parent c44f063 commit bea0a58

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/assoc_array.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ static bool assoc_array_insert_mid_shortcut(struct assoc_array_edit *edit,
938938
edit->leaf_p = &new_n0->slots[0];
939939

940940
pr_devel("<--%s() = ok [split shortcut]\n", __func__);
941-
return edit;
941+
return true;
942942
}
943943

944944
/**

0 commit comments

Comments
 (0)