mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Haofeng Li <920484857@qq.com>
To: Donald Hunter <donald.hunter@gmail.com>,
	Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Haofeng Li <13266079573@163.com>,
	Haofeng Li <lihaofeng@kylinos.cn>
Subject: [PATCH] net: ynl: return actual error code in ynl_exec_dump()
Date: Fri, 26 Sep 2025 17:58:20 +0800	[thread overview]
Message-ID: <tencent_16B08FED03C970A0B8F75F16AE3D7A2F3305@qq.com> (raw)

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



             reply	other threads:[~2025-09-26 10:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-26  9:58 Haofeng Li [this message]
2025-09-26 18:24 ` Jakub Kicinski
2025-09-30 12:39   ` [PATCH WITHDRAWN] " Haofeng Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tencent_16B08FED03C970A0B8F75F16AE3D7A2F3305@qq.com \
    --to=920484857@qq.com \
    --cc=13266079573@163.com \
    --cc=donald.hunter@gmail.com \
    --cc=kuba@kernel.org \
    --cc=lihaofeng@kylinos.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®