public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: ynl: return actual error code in ynl_exec_dump()
@ 2025-09-26  9:58 Haofeng Li
  2025-09-26 18:24 ` Jakub Kicinski
  0 siblings, 1 reply; 3+ messages in thread
From: Haofeng Li @ 2025-09-26  9:58 UTC (permalink / raw)
  To: Donald Hunter, Jakub Kicinski
  Cc: netdev, linux-kernel, Haofeng Li, Haofeng Li

From: Haofeng Li <lihaofeng@kylinos.cn>

Return the real error code 'err' instead of hardcoded -1 in the error
path of ynl_exec_dump(). This provides better error information to
callers for debugging and error handling.

Signed-off-by: Haofeng Li <lihaofeng@kylinos.cn>
---
 tools/net/ynl/lib/ynl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/net/ynl/lib/ynl.c b/tools/net/ynl/lib/ynl.c
index 2a169c3c0797..1a79adcc3ac0 100644
--- a/tools/net/ynl/lib/ynl.c
+++ b/tools/net/ynl/lib/ynl.c
@@ -1064,5 +1064,5 @@ int ynl_exec_dump(struct ynl_sock *ys, struct nlmsghdr *req_nlh,
 
 err_close_list:
 	yds->first = ynl_dump_end(yds);
-	return -1;
+	return err;
 }
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-09-30 12:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-26  9:58 [PATCH] net: ynl: return actual error code in ynl_exec_dump() Haofeng Li
2025-09-26 18:24 ` Jakub Kicinski
2025-09-30 12:39   ` [PATCH WITHDRAWN] " Haofeng Li

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