diff options
author | Peter Foley <pefoley@google.com> | 2022-01-14 13:08:58 +0800 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2022-02-14 11:50:44 +0800 |
commit | 41bcea7b2c99b8aec613beb62a6cdeb371a09449 (patch) | |
tree | d4f87b1500ed18464409dfa6fef754b1577fbb8c | |
parent | f3e5a17593b972a9a6079ccf7677b4389d74d5a1 (diff) | |
download | qemu-41bcea7b2c99b8aec613beb62a6cdeb371a09449.zip qemu-41bcea7b2c99b8aec613beb62a6cdeb371a09449.tar.gz qemu-41bcea7b2c99b8aec613beb62a6cdeb371a09449.tar.bz2 |
net/tap: Set return code on failure
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>
-rw-r--r-- | net/tap.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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)) { |