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>
This commit is contained in:
Li Qiang 2018-11-09 00:13:34 -08:00 committed by Laurent Vivier
parent df68a7f3c8
commit afb73d575d

View File

@ -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;