netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrea Claudi <aclaudi@redhat.com>
To: netdev@vger.kernel.org
Cc: stephen@networkplumber.org, dsahern@gmail.com
Subject: [PATCH iproute2 1/2] dcb: fix return value on dcb_cmd_app_show
Date: Sat,  1 May 2021 18:39:22 +0200	[thread overview]
Message-ID: <d2475b23f31e8cb1eb19d51d8bb10866a06a418c.1619886883.git.aclaudi@redhat.com> (raw)
In-Reply-To: <cover.1619886883.git.aclaudi@redhat.com>

dcb_cmd_app_show() is supposed to return EINVAL if an incorrect argument
is provided.

Fixes: 8e9bed1493f5 ("dcb: Add a subtool for the DCB APP object")
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
---
 dcb/dcb_app.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dcb/dcb_app.c b/dcb/dcb_app.c
index c4816bc2..28f40614 100644
--- a/dcb/dcb_app.c
+++ b/dcb/dcb_app.c
@@ -667,7 +667,7 @@ static int dcb_cmd_app_show(struct dcb *dcb, const char *dev, int argc, char **a
 out:
 	close_json_object();
 	dcb_app_table_fini(&tab);
-	return 0;
+	return ret;
 }
 
 static int dcb_cmd_app_flush(struct dcb *dcb, const char *dev, int argc, char **argv)
-- 
2.30.2


  reply	other threads:[~2021-05-01 16:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-01 16:39 [PATCH iproute2 0/2] dcb: some misc fixes Andrea Claudi
2021-05-01 16:39 ` Andrea Claudi [this message]
2021-05-05  8:39   ` [PATCH iproute2 1/2] dcb: fix return value on dcb_cmd_app_show Petr Machata
2021-05-06 14:48   ` David Ahern
2021-05-01 16:39 ` [PATCH iproute2 2/2] dcb: fix memory leak Andrea Claudi
2021-05-05  8:33   ` Petr Machata
2021-05-03 14:49 ` [PATCH iproute2 0/2] dcb: some misc fixes David Ahern

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=d2475b23f31e8cb1eb19d51d8bb10866a06a418c.1619886883.git.aclaudi@redhat.com \
    --to=aclaudi@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.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;
as well as URLs for NNTP newsgroup(s).