From: Li Qiang <[email protected]> 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 <[email protected]> Reviewed-by: Laurent Vivier <[email protected]> Reviewed-by: Thomas Huth <[email protected]> Reviewed-by: Paolo Bonzini <[email protected]> Message-Id: <[email protected]> Signed-off-by: Laurent Vivier <[email protected]> --- hw/core/qdev-properties-system.c | 4 ---- 1 file changed, 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; -- 2.19.2
