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/[email protected] Signed-off-by: Roman Smirnov <[email protected]> Reviewed-by: Sergey Shtylyov <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent c44f063 commit bea0a58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)