[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL V3 02/13] net/tap: Set return code on failure
From: |
Jason Wang |
Subject: |
[PULL V3 02/13] net/tap: Set return code on failure |
Date: |
Fri, 14 Jan 2022 13:08:58 +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 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
- [PULL V3 00/13] Net patches, Jason Wang, 2022/01/14
- [PULL V3 01/13] hw/net/vmxnet3: Log guest-triggerable errors using LOG_GUEST_ERROR, Jason Wang, 2022/01/14
- [PULL V3 02/13] net/tap: Set return code on failure,
Jason Wang <=
- [PULL V3 03/13] net: Fix uninitialized data usage, Jason Wang, 2022/01/14
- [PULL V3 04/13] net/colo-compare.c: Optimize compare order for performance, Jason Wang, 2022/01/14
- [PULL V3 06/13] net/filter: Optimize filter_send to coroutine, Jason Wang, 2022/01/14
- [PULL V3 05/13] net/colo-compare.c: Update the default value comments, Jason Wang, 2022/01/14
- [PULL V3 07/13] net/vmnet: add vmnet dependency and customizable option, Jason Wang, 2022/01/14
- [PULL V3 08/13] net/vmnet: add vmnet backends to qapi/net, Jason Wang, 2022/01/14
- [PULL V3 09/13] net/vmnet: implement shared mode (vmnet-shared), Jason Wang, 2022/01/14
- [PULL V3 10/13] net/vmnet: implement host mode (vmnet-host), Jason Wang, 2022/01/14
- [PULL V3 12/13] net/vmnet: update qemu-options.hx, Jason Wang, 2022/01/14
- [PULL V3 13/13] net/vmnet: update MAINTAINERS list, Jason Wang, 2022/01/14