diff options
| author | Markus Armbruster <armbru@redhat.com> | 2019-11-30 20:42:20 +0100 |
|---|---|---|
| committer | Markus Armbruster <armbru@redhat.com> | 2019-12-02 16:14:33 +0100 |
| commit | 4dbac1aed2ca7e68e9384b0e49750d54d4cbd43d (patch) | |
| tree | 654a02603532782bf2b2204c6bf09a8c6245ddae /scripts/qapi/common.py | |
| parent | fb2246882a2c8d7f084ebe0617e97ac78467d156 (diff) | |
| download | focaccia-qemu-4dbac1aed2ca7e68e9384b0e49750d54d4cbd43d.tar.gz focaccia-qemu-4dbac1aed2ca7e68e9384b0e49750d54d4cbd43d.zip | |
net/virtio: Drop useless n->primary_dev not null checks
virtio_net_handle_migration_primary() returns early when it can't ensure n->primary_dev is non-null. Checking it again right after that early return is redundant. Drop. If n->primary_dev is null on entering failover_replug_primary(), @pdev will become null, and pdev->partially_hotplugged will crash. Checking n->primary_dev later is useless. It can't actually be null, because its caller virtio_net_handle_migration_primary() ensures it isn't. Drop the useless check. Cc: Jens Freimann <jfreimann@redhat.com> Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20191130194240.10517-2-armbru@redhat.com> Reviewed-by: Jens Freimann <jfreimann@redhat.com>
Diffstat (limited to 'scripts/qapi/common.py')
0 files changed, 0 insertions, 0 deletions