aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Qiang <liq3ea@gmail.com>2018-11-09 00:13:34 -0800
committerLaurent Vivier <laurent@vivier.eu>2018-12-11 18:28:46 +0100
commitafb73d575d821b48456fd8ef9df4c504b0cd84f4 (patch)
treeb8996f481acef5d4eae105fdd3e9fab0aa7b5753
parentdf68a7f3c8c677165ba875d15c228ab4d0225abd (diff)
hw: set_netdev: remove useless code
In set_netdev(), the peers[i] is initialized qemu_find_net_clients_except() when i is in 0 between 'queues' it can't be NULL. Signed-off-by: Li Qiang <liq3ea@gmail.com> Reviewed-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1541751214-17515-1-git-send-email-liq3ea@gmail.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
-rw-r--r--hw/core/qdev-properties-system.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c
index 8b22fb51c9..b45a7ef54b 100644
--- a/hw/core/qdev-properties-system.c
+++ b/hw/core/qdev-properties-system.c
@@ -288,10 +288,6 @@ static void set_netdev(Object *obj, Visitor *v, const char *name,
}
for (i = 0; i < queues; i++) {
- if (peers[i] == NULL) {
- err = -ENOENT;
- goto out;
- }
if (peers[i]->peer) {
err = -EEXIST;