[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/8] net/tap: Set return code on failure
From: |
Jason Wang |
Subject: |
[PATCH 2/8] net/tap: Set return code on failure |
Date: |
Mon, 14 Feb 2022 11:57:35 +0800 |
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 f716be3e3f..c5cbeaa7a2 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.32.0 (Apple Git-132)
- [PATCH 1/8] hw/net/vmxnet3: Log guest-triggerable errors using LOG_GUEST_ERROR, Jason Wang, 2022/02/13
- [PATCH 2/8] net/tap: Set return code on failure,
Jason Wang <=
- [PATCH 3/8] net: Fix uninitialized data usage, Jason Wang, 2022/02/13
- [PATCH 4/8] net/colo-compare.c: Optimize compare order for performance, Jason Wang, 2022/02/13
- [PATCH 5/8] net/colo-compare.c: Update the default value comments, Jason Wang, 2022/02/13
- [PATCH 6/8] net/filter: Optimize filter_send to coroutine, Jason Wang, 2022/02/13
- [PATCH 7/8] hw/net: e1000e: Clear ICR on read when using non MSI-X interrupts, Jason Wang, 2022/02/13
- [PATCH 8/8] net/eth: Don't consider ESP to be an IPv6 option header, Jason Wang, 2022/02/13
- Re: [PATCH 1/8] hw/net/vmxnet3: Log guest-triggerable errors using LOG_GUEST_ERROR, Jason Wang, 2022/02/13