qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: peter.maydell@linaro.org
Cc: "Patrick Venture" <venture@google.com>,
	"Jason Wang" <jasowang@redhat.com>,
	"Peter Foley" <pefoley@google.com>,
	qemu-devel@nongnu.org, "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [PULL V3 02/13] net/tap: Set return code on failure
Date: Fri, 14 Jan 2022 13:08:58 +0800	[thread overview]
Message-ID: <20220114050909.27133-3-jasowang@redhat.com> (raw)
In-Reply-To: <20220114050909.27133-1-jasowang@redhat.com>

From: Peter Foley <pefoley@google.com>

Match the other error handling in this function.

Fixes: e7b347d0bf6 ("net: detect errors from probing vnet hdr flag for TAP devices")

Reviewed-by: Patrick Venture <venture@google.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Peter Foley <pefoley@google.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
 net/tap.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/tap.c b/net/tap.c
index f716be3..c5cbeaa 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -900,6 +900,7 @@ int net_init_tap(const Netdev *netdev, const char *name,
             if (i == 0) {
                 vnet_hdr = tap_probe_vnet_hdr(fd, errp);
                 if (vnet_hdr < 0) {
+                    ret = -1;
                     goto free_fail;
                 }
             } else if (vnet_hdr != tap_probe_vnet_hdr(fd, NULL)) {
-- 
2.7.4



  parent reply	other threads:[~2022-01-14  5:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-14  5:08 [PULL V3 00/13] Net patches Jason Wang
2022-01-14  5:08 ` [PULL V3 01/13] hw/net/vmxnet3: Log guest-triggerable errors using LOG_GUEST_ERROR Jason Wang
2022-01-14  5:08 ` Jason Wang [this message]
2022-01-14  5:08 ` [PULL V3 03/13] net: Fix uninitialized data usage Jason Wang
2022-01-14  5:09 ` [PULL V3 04/13] net/colo-compare.c: Optimize compare order for performance Jason Wang
2022-01-14  5:09 ` [PULL V3 05/13] net/colo-compare.c: Update the default value comments Jason Wang
2022-01-14  5:09 ` [PULL V3 06/13] net/filter: Optimize filter_send to coroutine Jason Wang
2022-01-14  5:09 ` [PULL V3 07/13] net/vmnet: add vmnet dependency and customizable option Jason Wang
2022-01-14  5:09 ` [PULL V3 08/13] net/vmnet: add vmnet backends to qapi/net Jason Wang
2022-01-14  5:09 ` [PULL V3 09/13] net/vmnet: implement shared mode (vmnet-shared) Jason Wang
2022-01-14  5:09 ` [PULL V3 10/13] net/vmnet: implement host mode (vmnet-host) Jason Wang
2022-01-14  5:09 ` [PULL V3 11/13] net/vmnet: implement bridged mode (vmnet-bridged) Jason Wang
2022-01-14  5:09 ` [PULL V3 12/13] net/vmnet: update qemu-options.hx Jason Wang
2022-01-14  5:09 ` [PULL V3 13/13] net/vmnet: update MAINTAINERS list Jason Wang
2022-01-14  9:19 ` [PULL V3 00/13] Net patches Jason Wang
2022-01-14 10:23   ` Peter Maydell

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=20220114050909.27133-3-jasowang@redhat.com \
    --to=jasowang@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=pefoley@google.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=venture@google.com \
    /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).