aboutsummaryrefslogtreecommitdiff
path: root/lib/assoc_array.c
diff options
context:
space:
mode:
authorRoman Smirnov <[email protected]>2024-03-07 10:17:17 +0300
committerAndrew Morton <[email protected]>2024-03-12 13:09:23 -0700
commitbea0a58695870295a315cec15a9fea6f40fe5ff3 (patch)
tree28df0d73195952dbcb3220f6dd19747c444fc557 /lib/assoc_array.c
parentc44f063e740ed580574b9012751e641e749bbe0e (diff)
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]>
Diffstat (limited to 'lib/assoc_array.c')
-rw-r--r--lib/assoc_array.c2
1 files changed, 1 insertions, 1 deletions
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;
}
/**