mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] assoc_array: clean up return in assoc_array_insert_mid_shortcut()
@ 2022-05-31 12:14 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2022-05-31 12:14 UTC (permalink / raw)
  To: Gustavo A. R. Silva, David Howells
  Cc: Len Baker, linux-kernel, kernel-janitors

The assoc_array_insert_mid_shortcut() function returns type bool.  It's
cleaner to "return true;" instead of returning the edit pointer cast to
bool.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 lib/assoc_array.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/assoc_array.c b/lib/assoc_array.c
index 079c72e26493..552a4970a9d1 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;
 }
 
 /**
-- 
2.35.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-31 12:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-31 12:14 [PATCH] assoc_array: clean up return in assoc_array_insert_mid_shortcut() Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®