Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Roman Smirnov and committed by
Andrew Morton
bea0a586 c44f063e

+1 -1
+1 -1
lib/assoc_array.c
··· 938 938 edit->leaf_p = &new_n0->slots[0]; 939 939 940 940 pr_devel("<--%s() = ok [split shortcut]\n", __func__); 941 - return edit; 941 + return true; 942 942 } 943 943 944 944 /**