[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 01/21] net/virtio: Drop useless n->primary_dev not null check

From: Jens Freimann
Subject: Re: [PATCH 01/21] net/virtio: Drop useless n->primary_dev not null checks
Date: Mon, 2 Dec 2019 10:53:48 +0100
User-agent: NeoMutt/20180716-1376-5d6ed1

On Sat, Nov 30, 2019 at 08:42:20PM +0100, Markus Armbruster wrote:
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 <address@hidden>
Cc: Michael S. Tsirkin <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
hw/net/virtio-net.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)

Thanks Markus!

Reviewed-by: Jens Freimann <address@hidden>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]